Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Core: Migrate from AMD to ES modules 🎉#4541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mgol merged 20 commits intojquery:masterfrommgol:es-modules
Nov 18, 2019
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
20 commits
Select commitHold shift + click to select a range
7993682
Core: Migrate all source AMD modules to ECMAScript modules
mgolOct 23, 2019
11bc60a
Core: Use explicit extensions for imports so that they work natively
mgolOct 23, 2019
8cd544d
Core: Make noGlobal handling in global.js work in ES modules mode
mgolOct 23, 2019
c90d8a1
Ajax: Workaround nonce being immutable as an ES module
mgolOct 23, 2019
fa6878b
Build: Add a basic Rollup config
mgolOct 23, 2019
a72e591
Build: Remove an export from src/queue/delay.js
mgolOct 24, 2019
82cb929
Build: Make sure the jQuery global isn't set when ES modules are used
mgolOct 24, 2019
d68ad3c
Tests: Convert test setup to work with source ES modules
mgolOct 24, 2019
e0e5bff
Build: A basic fully working Rollup build (`grunt` & `npm test` both …
mgolOct 28, 2019
9dc310e
Build: Normalize srcFolder, fix rollupHypotheticalOptions usage
mgolNov 14, 2019
7fe6f83
Core: disable the max-len rule for the version variable
mgolNov 14, 2019
c6b75df
Build: Add back support for custom compilation
mgolNov 14, 2019
1065fa3
Core: Import "./core/parseHTML.js" directly in jquery.js
mgolNov 14, 2019
a4250b2
Core: Minor comments tweaks
mgolNov 14, 2019
afeb0eb
Build: rename jsmodules to esmodules
mgolNov 15, 2019
3b21968
Build: Use more of Rollup API, simplify logic
mgolNov 17, 2019
f6f0545
Build: Simplify ESLint exclusions & globals, revert globalJQuery to n…
mgolNov 17, 2019
910d815
Build: Move the parseHTML import to save size
mgolNov 18, 2019
c2d5407
Build: Compress ajax/var/nonce.js
mgolNov 18, 2019
eba151a
Build: ESLint tweaks
mgolNov 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
PrevPrevious commit
NextNext commit
Build: Simplify ESLint exclusions & globals, revert globalJQuery to n…
…oGlobal
  • Loading branch information
@mgol
mgol committedNov 17, 2019
commitf6f05459e1dd6afdaaf5cf8d62f43febd062b143
1 change: 0 additions & 1 deletionbuild/tasks/build.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,7 +35,6 @@ module.exports = function( grunt ) {
format: "esm",

intro: wrapper[ 0 ]
.replace( /\/\*\s*eslint(?: |-).*\s*\*\/\n/, "" )
.replace( /\n*$/, "" ),
outro: wrapper[ 1 ]
.replace( /^\n*/, "" )
Expand Down
4 changes: 4 additions & 0 deletionsdist/.eslintrc.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,5 +11,9 @@
"rules": {
// That is okay for the built version
"no-multiple-empty-lines": "off"
},

"globals": {
"Symbol": false
}
}
16 changes: 15 additions & 1 deletionsrc/.eslintrc.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,6 +15,9 @@
"ecmaVersion": 5,
"sourceType": "script"
},
"rules": {
"no-unused-vars": "off"
},
"globals": {
"jQuery": false
}
Expand All@@ -23,7 +26,18 @@
{
"files": "global.js",
"globals": {
"globalJQuery": false
"noGlobal": false
}
},

{
"files": "core.js",
"globals": {

// Defining Symbol globally would create a danger of using
// it unguarded in another place, it seems safer to define
// it only for this module.
"Symbol": false
}
}
]
Expand Down
4 changes: 0 additions & 4 deletionssrc/core.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
/* global Symbol */
// Defining this global in .eslintrc.json would create a danger of using the global
// unguarded in another place, it seems safer to define global only for this module

import arr from "./var/arr.js";
import getProto from "./var/getProto.js";
import slice from "./var/slice.js";
Expand Down
2 changes: 1 addition & 1 deletionsrc/exports/global.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,6 +23,6 @@ jQuery.noConflict = function( deep ) {
// Expose jQuery and $ identifiers, even in AMD
// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
// and CommonJS for browser emulators (#13566)
if ( typeofglobalJQuery !== "undefined" ) {
if ( typeofnoGlobal === "undefined" ) {
window.jQuery = window.$ = jQuery;
}
9 changes: 4 additions & 5 deletionssrc/wrapper.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-unused-vars*/
/*!
* jQuery JavaScript Library v@VERSION
* https://jquery.com/
Expand All@@ -23,19 +22,19 @@
// e.g. var jQuery = require("jquery")(window);
// See ticket #14549 for more info.
module.exports = global.document ?
factory( global ) :
factory( global, true ) :
function( w ) {
if ( !w.document ) {
throw new Error( "jQuery requires a window with a document" );
}
return factory( w, true );
return factory( w );
};
} else {
factory( global, true );
factory( global );
}

// Pass this if window is not defined yet
} )( typeof window !== "undefined" ? window : this, function( window,globalJQuery ) {
} )( typeof window !== "undefined" ? window : this, function( window,noGlobal ) {

"use strict";

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp