Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Builds on #40 (dropping bower).
jQuery
module
,exports
,browser
, andtype
for ESM usage by bundlers or Nodejquery
instance (passing in alone not sufficient)A couple notes:
jquery.easing.js
andjquery.easing.min.js
to a newdist
folder, as that should make things a bit cleaner, though it would increase breakage as the path would change.exports
inpackage.json
jquery/jquery#4592 ), usingimport
statements against jQuery in source would need our adding Rollup's commonjs plugin, and it would have the disadvantage of baking in a specific version of jQuery, adding to bundle size (unless we kept the import statement as an import statement, but then users would have to do their own bundling based on our bundle which isn't very convenient). So, currently, even one of the ESM source files relies on ajQuery
global, though there is also another source fileaddJQueryEasing.js
(in source atsrc/addJQueryEasing.mjs
) which allows one to pass in one's own jQuery instance if that is desired. jQuery's current lack of proper ESM export is another reason I didn't bother with a native Node ESM demo, though I tentatively added such support inpackage.json
(by thetype
andexports
fields).jsdom
to get things working properly (I added a demo that executes without error, but as it is in Node, there is of course no visual effect). Note that CJS support had been broken until recently anyways, so I don't think this necessitates a breaking change (nor, as a result, should I think the addition ofexports
be so, even though it normally would be a breaking change since it prevents Node access to other files--but it wouldn't of course impact browser use even if installed by npm).module
andbrowser
can be breaking changes too, but I think they are targeting the files that should be expected.jquery
as a peer dependency for Node usage, but Node really needs custom tooling likejsdom
as well, so maybe better to avoid the hassle of having to keeppeerDependencies
up to date.standard
,airbnb
, etc., if you like.