Build: First pass at minifying module JS#8153
Conversation
aad15a1 to
b4dec19
Compare
40db227 to
35a94e7
Compare
|
I've now scoped this changeset down to the shortcodes module for the time being. This will make the PR easier to review for the time being and allows us to verify this approach without investing time in changing all the files that enqueue JS multiple times. |
|
Looks like there's an issue with sourcemap paths. I'll look into this tomorrow. |
|
I've just checked this branch and have these observations:
EDIT: All of the above was me testing on an old version of this branch. |
c1a5419 to
fc18ef3
Compare
|
I have fixed the issue that I noticed yesterday with sourcemaps. The issue was that we were piping to banner between sourcemaps init and sourcemaps write. As soon as I moved the pipe to banner to above sourcemaps init, all was well with the world. |
oskosk
left a comment
There was a problem hiding this comment.
Searching the codebase for modules/shortcodes/js/jmpress.min.js says we are referencing some of the files removed or changed by this PR in .jshintignore. Should it be updated ?
oskosk
left a comment
There was a problem hiding this comment.
Tested well with all shortcodes. Apart from the comment I left about .jshintignore, PR looks great!
There was a problem hiding this comment.
So, this tests well. @dereksmart how should we handle the new .map files regarding .svnignore... We don't want those in the plugin directory... Can we solve this doubt before merging ?
Correct, we want to make sure any .map files are added to svnignore, as we're doing with the admin UI map files. |
fc18ef3 to
a5eb68f
Compare
|
I've addressed feedback such that we are now:
As a follow-up to this PR, I'll move other JS and CSS map files to the |
a78ff1d to
4679eeb
Compare
4679eeb to
1ce178a
Compare
* Changelog 5.6: create base for changelog. * Update changelog with 5.5.1 info. * Changelog: add #7930 and #8238 * Changelog: add #8076 * Changelog: add #8100 * Changelog: add #8117 * Changelog: add #8141 * Changelog: add #8143 * Changelog: add #8147 * Changelog: add #8149 * Changelog: add #8153 * Changelog: add #8173 * Changelog: add #8184 * Changelog: add #8196 * Changelog: add #8199 * Changelog: add #8093 * Changelog: add #8171 * Changelog: add #8182 * Changelog: add #8202, #8222 * Changelog: add #8228 * Changelog: add #8240 * Changelog: add #8251 * remove AL card change
As part of a front-end performance audit that @gravityrail and I are doing, this PR will start minifying all front-end assets that are loaded from the shortcodes module.
To test:
yarn buildmore _inc/build/shortcodes/js/jmpress.min.jswp-config.php, adddefine( 'SCRIPT_DEBUG, true );` and check that non-minified files are now enqueued by checking the sourceNote: I am removing
modules/shortcodes/js/jmpress.min.jsfrom source control since we'll now build it.