mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Build: Followups after introducing ES modules compiled via Rollup
This commit cleans up a few comments & configurations that are out of date after the migration to ES modules backed by a Rollup-based compilation. Also, de-indent AMD modules. This will preserve a more similar structure to the one on 3.x-stable where the body of the main `define` wrapper is not indented. Closes gh-4705
This commit is contained in:
parent
297d18dd13
commit
55cd3a4436
@ -1,14 +1,5 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "./.eslintrc-node.json",
|
||||
|
||||
"overrides": [
|
||||
{
|
||||
"files": "rollup.config.js",
|
||||
"parserOptions": {
|
||||
"sourceType": "module"
|
||||
}
|
||||
}
|
||||
]
|
||||
"extends": "./.eslintrc-node.json"
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ module.exports = function( grunt ) {
|
||||
grunt.initConfig( {
|
||||
pkg: grunt.file.readJSON( "package.json" ),
|
||||
dst: readOptionalJSON( "dist/.destination.json" ),
|
||||
"compare_size": {
|
||||
compare_size: {
|
||||
files: [ "dist/jquery.js", "dist/jquery.min.js" ],
|
||||
options: {
|
||||
compress: {
|
||||
@ -232,7 +232,7 @@ module.exports = function( grunt ) {
|
||||
"test/data/jquery-1.9.1.js",
|
||||
"test/data/testinit-jsdom.js",
|
||||
|
||||
// We don't support various loading methods like AMD,
|
||||
// We don't support various loading methods like esmodules,
|
||||
// choosing a version etc. for jsdom.
|
||||
"dist/jquery.js",
|
||||
|
||||
|
@ -19,7 +19,8 @@ module.exports = function( grunt ) {
|
||||
|
||||
const outputRollupOptions = {
|
||||
format: "amd",
|
||||
dir: "amd"
|
||||
dir: "amd",
|
||||
indent: false
|
||||
};
|
||||
|
||||
grunt.registerTask(
|
||||
|
@ -54,7 +54,7 @@ module.exports = function( grunt ) {
|
||||
|
||||
grunt.registerMultiTask(
|
||||
"build",
|
||||
"Concatenate source, remove sub AMD definitions, " +
|
||||
"Build jQuery ECMAScript modules, " +
|
||||
"(include/exclude modules with +/- flags), embed date/version",
|
||||
async function() {
|
||||
const done = this.async();
|
||||
@ -302,7 +302,7 @@ module.exports = function( grunt ) {
|
||||
);
|
||||
|
||||
grunt.file.write( name, compiledContents );
|
||||
grunt.log.ok( "File '" + name + "' created." );
|
||||
grunt.log.ok( `File '${ name }' created.` );
|
||||
done();
|
||||
} catch ( err ) {
|
||||
done( err );
|
||||
|
@ -34,7 +34,7 @@
|
||||
// Code Style. This makes that indentation check is not
|
||||
// performed for 1 depth of outer FunctionExpressions
|
||||
"ignoredNodes": [
|
||||
"Program > ExpressionStatement > CallExpression > FunctionExpression > *"
|
||||
"Program > ExpressionStatement > CallExpression > :last-child > *"
|
||||
]
|
||||
} ]
|
||||
},
|
||||
|
@ -576,7 +576,7 @@ jQuery.extend( {
|
||||
}
|
||||
|
||||
// We can fire global events as of now if asked to
|
||||
// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
|
||||
// Don't fire events if jQuery.event is undefined in an ESM-usage scenario (trac-15118)
|
||||
fireGlobals = jQuery.event && s.global;
|
||||
|
||||
// Watch for a new set of requests
|
||||
|
Loading…
Reference in New Issue
Block a user