aboutsummaryrefslogtreecommitdiffstats
path: root/build/tasks/build.js
Commit message (Collapse)AuthorAgeFilesLines
* Build: Reduce the slim build header comment & jQuery.fn.jqueryMichał Gołębiowski-Owczarek2020-04-271-21/+36
| | | | | | | | | | | | | | | | | | | | | | | So far, the slim build was expanded to its full exclusion list, generating the following `jQuery.fn.jquery`: ``` v4.0.0-pre -ajax,-ajax/jsonp,-ajax/load,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-deprecated/ajax-event-alias,-callbacks,-deferred,-deferred/exceptionHook,-effects,-effects/Tween,-effects/animatedSelector,-queue,-queue/delay,-core/ready ``` This commit changes it to just `v4.0.0-pre slim`. Only the pure slim build is treated this way, any modification to it goes through the old expansion; e.g. for `custom:slim,-deprecated` we get the following `jQuery.fn.jquery`: ``` v4.0.0-pre -deprecated,-deprecated/ajax-event-alias,-deprecated/event,-ajax,-ajax/jsonp,-ajax/load,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-callbacks,-deferred,-deferred/exceptionHook,-effects,-effects/Tween,-effects/animatedSelector,-queue,-queue/delay,-core/ready ``` Since the version string is also put in the jQuery header comment, it also got smaller. Also, the logic to skip including the commit hash in the header comment - when provided through the COMMIT environment variable which we do in Jenkins - in minified builds headers has been applied to builds with exclusions as well. Closes gh-4649
* Core: Exclude callbacks & deferred modules in the slim build as wellMichał Gołębiowski-Owczarek2020-01-201-1/+1
| | | | | | | | | | | So far, the slim build only excluded ajax & effects modules. As many web apps right now rely on native Promises, often with a polyfill for legacy browsers, deferred & callbacks modules are not that useful for sites that already exclude ajax & effects modules. This decreases the gzipped minified size of the slim module by 1760 bytes, to 19706 bytes (below 20k!). Closes gh-4553
* Build: Create a `grunt custom:slim` alias for the Slim build (#4578)Michał Gołębiowski-Owczarek2020-01-071-1/+19
| | | Closes gh-4578
* Build: Fix the Windows buildMichał Gołębiowski-Owczarek2019-12-021-17/+27
| | | | | | | This commit gets rid of rollup-plugin-hypothetical in favor of a simpler inline Rollup plugin that fits our need and is compatible with Windows. Fixes gh-4548 Closes gh-4549
* Core: Migrate from AMD to ES modules 🎉Michał Gołębiowski-Owczarek2019-11-181-207/+174
| | | | | | | | | | | | | | | | | | | | | | Migrate all source AMD modules to ECMAScript modules. The final bundle is compiled by a custom build process that uses Rollup under the hood. Test files themselves are still loaded via RequireJS as that has to work in IE 11. Tests can now be run in "Load as modules" mode which replaces the previous "Load with AMD" option. That option of running tests doesn't work in IE and Edge as it requires support for dynamic imports. Some of the changes required by the migration: * check `typeof` of `noGlobal` instead of using the variable directly as it's not available when modules are used * change the nonce module to be an object as ECMASscript module exports are immutable * remove some unused exports * import `./core/parseHTML.js` directly in `jquery.js` so that it's not being cut out when the `ajax` module is excluded in a custom compilation Closes gh-4541
* Build: Require strict mode in Node.js scripts via ESLintMichał Gołębiowski-Owczarek2019-10-091-3/+2
| | | | | | | | So far, only browser-based JS files were required to be in strict mode (in the function form). This commit adds such a requirement to Node.js scripts where the global form is preferred. All Node.js scripts in sloppy mode were converted to strict mode. Closes gh-4499
* Selector: Inline Sizzle into the selector moduleMichał Gołębiowski-Owczarek2019-07-291-19/+0
| | | | | | | | | | | | | | | | | | This commit removes Sizzle from jQuery, inlining its code & removing obsolete workarounds where applicable. The selector-native module has been removed. Further work on the selector module may decrease the size enough that it will no longer be necessary. If it turns out it's still useful, we'll reinstate it but the code will look different anyway as we'll want to share as much code as possible with the existing selector module. The Sizzle AUTHORS.txt file has been merged with the jQuery one - people are sorted by their first contributions to either of the two repositories. The commit reduces the gzipped jQuery size by 1460 bytes compared to master. Closes gh-4395
* Build: ESLint: forbid unused function parametersMichał Gołębiowski-Owczarek2019-05-131-1/+1
| | | | | | | | | | | | | This commit requires all function parameters to be used, not just the last one. In cases where that's not possible as we need to match an external API, there's an escape hatch of prefixing an unused argument with `_`. This change makes it easier to catch unused AMD dependencies and unused parameters in internal functions the API of which we may change at will, among other things. Unused AMD dependencies have been removed as part of this commit. Closes gh-4381
* Build: Fix the regex parsing AMD var-modules (#4389)Michał Gołębiowski-Owczarek2019-05-131-1/+1
| | | | | | | | | | | | | | | | The previous regex caused the final jQuery binary to have syntax errors for var-modules with names starting with "return". For example, the following module wouldn't work when the file is named `returnTrue.js`: ```js define( function() { "use strict"; return function returnTrue() { return true; }; } ); ``` Closes gh-4389
* Build: Make the @CODE-replacing regex more robustMichał Gołębiowski2016-12-051-1/+5
| | | | | | | | | | | | | The code replacing @CODE in wrapper.js was written so that it expected both the code and the next line to start in the first column. This commit adjusts the regex so to get rid of that assumption and to work properly regardless of number of lines with comments after this block. While this is technically not necessary for our code, contributors sometimes re-format the wrapper file in their pull requests and the error messages they get don't tell them what's the real problem with their code. Closes gh-3429
* Core: expose noConflict in AMD modeTimmy Willison2016-08-151-5/+1
| | | | | | | | - For compability reasons, we had already added the global in AMD mode, but without noConflict. This adds back noConflict to AMD (which fixes noConflict mode in the tests). Fixes gh-2930
* Build: Fix the regex removing the ESLint comment from wrapper.jsMichał Gołębiowski2016-07-131-1/+1
| | | | | | | The new regex from after the switch from JSHint to ESLint wasn't catching the ESLint pragma correctly. Also, the spacing of the pragma comment was updated to match other comments.
* Build: ESLint detailsOleg Gaidarenko2016-06-111-2/+9
| | | | | | Use eslint pragmas, fix new errors, etc Closes gh-3148
* Build: Strip the strict-mode related comment in exports/global.jsMichał Gołębiowski2016-04-261-1/+4
| | | | | | | The comment (& the JSHint pragma) doesn't make sense in the context of the full built file. Closes gh-3078
* Build: Strip excessive "use strict" pragmas when buildingMichał Gołębiowski2016-04-261-1/+1
| | | | Fixes gh-3077
* Deferred: Remove default callback contextRichard Gibson2016-04-231-0/+3
| | | | | | | Employs strict mode to simplify Deferred callback context handling. Fixes gh-3060 Closes gh-3061
* Core: implement ready without DeferredTimmy Willison2016-04-041-2/+11
| | | | | | | | | - Make jQuery.ready promise-compatible - Gives up sync guarantee for post-ready callbacks Fixes gh-1778 Fixes gh-1823 Close gh-2891
* Build: try insight package to get info about custom buildsOleg Gaidarenko2016-03-141-2/+41
| | | | | Fixes gh-2890 Closes gh-2988
* Build: combine intro and outroTimmy Willison2016-03-091-2/+7
| | | | | Fixes gh-2975 Close gh-2976
* Build: use hard-coded path to sizzle in selector-sizzleTimmy Willison2016-02-101-4/+1
| | | | Fixes gh-2898
* Release: push a custom slim build to the CDNTimmy Willison2015-11-161-2/+6
| | | | | Fixes gh-2653 Close gh-2711
* Build: Fixed issue with base path that contain 'var'Martin Naumann2015-10-121-1/+1
| | | | | | | Remove the cwd from the paths, so the regex doesn't kick in on "var" Fixes gh-2450 Closes gh-2641
* Build: Update jscs and lint filesOleg Gaidarenko2015-09-071-15/+36
| | | | Fixes gh-2056
* Build: space between curly and paren is optionalTimmy Willison2015-06-191-2/+2
| | | | | Fixes gh-2399 Close gh-2400
* Build: fix tests in AMD modeTimmy Willison2014-12-091-8/+5
|
* Build: Remove empty define({}) from build outputDavid Corbacho2014-12-041-1/+3
| | | | | Fixes gh-1768 Closes gh-1569
* Build: Fix various typosOleg Gaidarenko2014-11-081-1/+1
| | | | | | | Thanks @jamesgpearce, @vlajos, @imyousuf Closes gh-1828 Closes gh-1830 Closes gh-1844
* Build: update grunt-jscs-checker and pass with the new rulesTimmy Willison2014-07-171-11/+25
|
* Build: Move all external libraries to external directoryScott González2014-06-241-1/+1
| | | | Closes gh-1593
* Build: Fix AMD option for custom buildsTimmy Willison2014-03-071-6/+12
| | | | Fixes #14859
* Build: add build option for setting the AMD name.Timmy Willison2013-12-191-2/+9
| | | | Fixes #14016.
* Build: Add the ability to remove global exposure.Timmy Willison2013-12-191-0/+7
| | | | Ref #14016
* Manage bower dependencies with grunt-bowercopyTimmy Willison2013-12-061-1/+1
| | | | | | | | | | | | Tracked bower dependencies are located at "src/sizzle" and "test/libs". The source-destination mapping is in the Gruntfile. When updating a bower dependency, update the version in bower.json, run `grunt bower`, and then commit the result. When adding a dependency, update the bowercopy task accordingly. Fixes #14615. Closes gh-1452.
* Use grunt and bower packages as local dependencies. Close gh-1433.Timmy Willison2013-11-141-1/+1
|
* No ticket. Remove the pre-uglify task form build/tasks/build.js. Fix custom ↵Michał Gołębiowski2013-11-101-1/+1
| | | | builds.
* Unify build script capabilities between branches. Specifically, added a ↵Timmy Willison2013-10-151-8/+9
| | | | special comment pragma for removing certain lines.
* Remove commentTimmy Willison2013-10-151-2/+1
|
* Update requirejs to compatible version, remove r.jsTimmy Willison2013-10-151-1/+1
|
* Map Sizzle to a path with config to allow users to put Sizzle wherever they wantTimmy Willison2013-09-101-1/+4
|
* Don't keep semicolons if the require call is not a var declarationTimmy Willison2013-09-091-3/+3
|
* Break jQuery.access out into its own module to separate it from core; Adjust ↵Timmy Willison2013-09-091-1/+4
| | | | CommonJS+AMD build support to include non-var dependencies. Convert modules with more than a few dependencies to use CJS+AMD syntax.
* Add AMD+CommonJS capabilities to the build script (for modules with long ↵Timmy Willison2013-09-091-0/+8
| | | | unreadable dependency lists)
* Restore optIn behavior for buildsTimmy Willison2013-09-081-6/+11
|
* Minor build change: remove trailing tabsTimmy Willison2013-08-161-2/+1
|
* When converting the source to AMD, don't forget to AMDTimmy Willison2013-08-161-2/+5
|
* Custom builds: Fix source folder location now that build.js is in the tasks ↵Timmy Willison2013-08-161-1/+1
| | | | folder
* Move jQuery specific tasks to independent files. Close gh-1334.Oleg Gaidarenko2013-08-161-0/+240
Also: * Confirm build task to the style guide * Use grunt API to load jQuery specific tasks * Add "use strict"; statements