Commit Graph

7 Commits

Author SHA1 Message Date
Michał Gołębiowski-Owczarek
8be4c0e4f8
Build: Add exports to package.json, export slim & esm builds
Summary of the changes:
* define the `exports` field in `package.json`; `jQuery` & `$` are also
  exported as named exports in ESM builds now
* declare `"type": "module"` globally except for the `build` folder
* add the `--esm` option to `grunt custom`, generating jQuery as an ECMAScript
  module into the `dist-module` folder
* expand `node_smoke_tests` to test the slim & ESM builds and their various
  combinations; also, test both jQuery loaded via a path to the file as well
  as from module specifiers that should be parsed via the `exports` feature
* add details about ESM usage to the release package README
* run `compare_size` on all built minified files; don't run it anymore on
  unminified files where they don't provide lots of value
* remove the remove_map_comment task; SWC doesn't insert the
`//# sourceMappingURL=` pragma by default so there's nothing to strip

Fixes gh-4592
Closes gh-5255
2023-07-10 19:14:08 +02:00
Michał Gołębiowski-Owczarek
edccabf10d
Docs: Update the README of the published package
The previous details were showing their age, e.g. mentions about browsers
not supporting ES2015. The story with ES modules is more complex as it's also
about loaders but to keep the README simple, let's just make it more up to date
with typical usage.

Closes gh-5108
2022-10-03 22:55:49 +02:00
Simon Legner
01819bc3bc
Docs: Update webpack website in README
Webpack has migrated to https://webpack.js.org/ since version 2.

Closes gh-5037
2022-07-12 17:16:24 +02:00
Pierre Grimaud
1a7332ce83
Docs: Fix typos
Closes gh-4686
2020-04-29 21:18:23 +02:00
Michał Gołębiowski-Owczarek
a62309e01b
Docs: Update the link to the jsdom repository
Closes gh-4684
2020-04-25 20:47:25 +02:00
Jonathan
73415da25d
Docs: Use https for hyperlinks in README
Closes gh-4673
2020-04-17 11:46:49 +02:00
Michał Gołębiowski-Owczarek
358b769a00
Release: Use an in-repository dist README fixture
Use a dist README fixture kept in the jQuery repository instead of modifying
an existing one. This makes the jQuery repository the single source of truth
when it comes to jQuery releases and it makes it easier to make changes to
README without worrying how it will affect older jQuery lines.

The commit also ES6ifies build/release.js & build/release/dist.js

Closes gh-4614
2020-03-02 22:42:38 +01:00