aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md26
1 files changed, 25 insertions, 1 deletions
diff --git a/README.md b/README.md
index cab646fcd..8d9ff0a93 100644
--- a/README.md
+++ b/README.md
@@ -111,7 +111,7 @@ The build process shows a message for each dependent module it excludes or inclu
##### AMD name
-As an option, you can set the module name for jQuery's AMD definition. By default, it is set to "jquery", which plays nicely with plugins and third-party libraries, but there may be cases where you'd like to change this. Simply set the `"amd"` option:
+As an option, you can set the module name for jQuery's AMD definition. By default, it is set to "jquery", which plays nicely with plugins and third-party libraries, but there may be cases where you'd like to change this. Simply pass it to the `--amd` parameter:
```bash
grunt custom --amd="custom-name"
@@ -123,6 +123,30 @@ Or, to define anonymously, set the name to an empty string.
grunt custom --amd=""
```
+##### File name
+
+The default name for the built jQuery file is `jquery.js`; it is placed under the `dist/` directory. It's possible to change the file name using the `--filename` parameter:
+
+```bash
+grunt custom:slim --filename="jquery.slim.js"
+```
+
+This would create a slim version of jQuery and place it under `dist/jquery.slim.js`. In fact, this is exactly the command we use to generate the slim jQuery during the release process.
+
+##### ECMAScript Module (ESM) mode
+
+By default, jQuery generates a regular script JavaScript file. You can also generate an ECMAScript module exporting `jQuery` as the default export using the `--esm` parameter:
+
+```bash
+grunt custom --esm
+```
+
+The default is `script` but you can also pass it explicitly via `--no-esm`:
+
+```bash
+grunt custom --no-esm
+```
+
#### Custom Build Examples
To create a custom build, first check out the version: