You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build: Generate the slim build on grunt & run compare_size on it
Summary of the changes:
* expand `node_smoke_tests` to test the full & slim builds
* run `compare_size` on all built minified files; don't run it anymore on
unminified files where they don't provide lots of value
The main goal of this change is to make it easier to compare sizes of both the
full & slim builds between the `3.x-stable` & `main` branches.
Closesgh-5291
Ref gh-5255
(partially cherry-picked from commit 8be4c0e)
Copy file name to clipboardExpand all lines: README.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,7 +117,7 @@ The build process shows a message for each dependent module it excludes or inclu
117
117
118
118
##### AMD name
119
119
120
-
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:
120
+
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:
121
121
122
122
```bash
123
123
grunt custom --amd="custom-name"
@@ -129,6 +129,16 @@ Or, to define anonymously, set the name to an empty string.
129
129
grunt custom --amd=""
130
130
```
131
131
132
+
##### File name
133
+
134
+
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:
135
+
136
+
```bash
137
+
grunt custom:slim --filename="jquery.slim.js"
138
+
```
139
+
140
+
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.
141
+
132
142
#### Custom Build Examples
133
143
134
144
To create a custom build, first check out the version:
0 commit comments