🌐 AI搜索 & 代理 主页
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
7993682
Core: Migrate all source AMD modules to ECMAScript modules
mgol Oct 23, 2019
11bc60a
Core: Use explicit extensions for imports so that they work natively
mgol Oct 23, 2019
8cd544d
Core: Make noGlobal handling in global.js work in ES modules mode
mgol Oct 23, 2019
c90d8a1
Ajax: Workaround nonce being immutable as an ES module
mgol Oct 23, 2019
fa6878b
Build: Add a basic Rollup config
mgol Oct 23, 2019
a72e591
Build: Remove an export from src/queue/delay.js
mgol Oct 24, 2019
82cb929
Build: Make sure the jQuery global isn't set when ES modules are used
mgol Oct 24, 2019
d68ad3c
Tests: Convert test setup to work with source ES modules
mgol Oct 24, 2019
e0e5bff
Build: A basic fully working Rollup build (`grunt` & `npm test` both …
mgol Oct 28, 2019
9dc310e
Build: Normalize srcFolder, fix rollupHypotheticalOptions usage
mgol Nov 14, 2019
7fe6f83
Core: disable the max-len rule for the version variable
mgol Nov 14, 2019
c6b75df
Build: Add back support for custom compilation
mgol Nov 14, 2019
1065fa3
Core: Import "./core/parseHTML.js" directly in jquery.js
mgol Nov 14, 2019
a4250b2
Core: Minor comments tweaks
mgol Nov 14, 2019
afeb0eb
Build: rename jsmodules to esmodules
mgol Nov 15, 2019
3b21968
Build: Use more of Rollup API, simplify logic
mgol Nov 17, 2019
f6f0545
Build: Simplify ESLint exclusions & globals, revert globalJQuery to n…
mgol Nov 17, 2019
910d815
Build: Move the parseHTML import to save size
mgol Nov 18, 2019
c2d5407
Build: Compress ajax/var/nonce.js
mgol Nov 18, 2019
eba151a
Build: ESLint tweaks
mgol Nov 18, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .eslintrc-browser.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
"env": {},

"globals": {
"window": true,
"define": true,
"module": true
"window": true
},

"rules": {
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc-node.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"extends": "jquery",

"parserOptions": {
"ecmaVersion": 2017
"ecmaVersion": 2018
},

"env": {
Expand Down
11 changes: 10 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"root": true,

"extends": "./.eslintrc-node.json"
"extends": "./.eslintrc-node.json",

"overrides": [
{
"files": "rollup.config.js",
"parserOptions": {
"sourceType": "module"
}
}
]
}
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ Rather than rebuilding jQuery with `grunt` every time you make a change, you can
$ grunt watch
```

Alternatively, you can **load tests in AMD** to avoid the need for rebuilding altogether.
Alternatively, you can **load tests as ECMAScript modules** to avoid the need for rebuilding altogether.

Click "Load with AMD" after loading the test page.
Click "Load as modules" after loading the test page.


### Repo organization

The jQuery source is organized with AMD modules and then concatenated and compiled at build time.
The jQuery source is organized with ECMAScript modules and then compiled into one file at build time.

jQuery also contains some special modules we call "var modules", which are placed in folders named "var". At build time, these small modules are compiled to simple var statements. This makes it easy for us to share variables across modules. Browse the "src" folder for examples.

Expand Down
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ module.exports = function( grunt ) {
"test/unit/ready.js",

{ pattern: "dist/jquery.*", included: false, served: true },
{ pattern: "src/**", included: false, served: true },
{ pattern: "src/**", type: "module", included: false, served: true },
{ pattern: "node_modules/**", included: false, served: true },
{
pattern: "test/**/*.@(js|css|jpg|html|xml|svg)",
Expand Down
Loading