diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2022-10-03 22:55:49 +0200 |
---|---|---|
committer | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2022-10-03 22:56:17 +0200 |
commit | 76edd26ebb2463d108a627993dcc2bd4cdee88dd (patch) | |
tree | 0169cd6cb982be5e292ff142fdb718b0a79d1c72 /build | |
parent | 965391ab9348c624b0fba42f79d3131652d9d494 (diff) | |
download | jquery-76edd26ebb2463d108a627993dcc2bd4cdee88dd.tar.gz jquery-76edd26ebb2463d108a627993dcc2bd4cdee88dd.zip |
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
(cherry picked from commit edccabf10d37b57cbd4eeebc44f3acb67cb2739c)
Diffstat (limited to 'build')
-rw-r--r-- | build/fixtures/README.md | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/build/fixtures/README.md b/build/fixtures/README.md index 02a69318a..360eb1c5c 100644 --- a/build/fixtures/README.md +++ b/build/fixtures/README.md @@ -19,17 +19,15 @@ Below are some of the most common ways to include jQuery. <script src="https://code.jquery.com/jquery-@VERSION.min.js"></script> ``` -#### Babel +#### Webpack / Browserify / Babel -[Babel](https://babeljs.io/) is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively. +There are several ways to use [Webpack](https://webpack.js.org/), [Browserify](http://browserify.org/) or [Babel](https://babeljs.io/). For more information on using these tools, please refer to the corresponding project's documentation. In the script, including jQuery will usually look like this: ```js import $ from "jquery"; ``` -#### Browserify/Webpack - -There are several ways to use [Browserify](http://browserify.org/) and [Webpack](https://webpack.js.org/). For more information on using these tools, please refer to the corresponding project's documentation. In the script, including jQuery will usually look like this... +If you need to use jQuery in a file that's not an ECMAScript module, you can use the CommonJS syntax: ```js var $ = require( "jquery" ); |