[wp-trac] [WordPress Trac] #25169: Optimize all images / pngs in core
WordPress Trac
noreply at wordpress.org
Tue Feb 18 02:10:41 UTC 2014
#25169: Optimize all images / pngs in core
------------------------------------+--------------------------------------
Reporter: bradparbs | Owner: nacin
Type: enhancement | Status: reopened
Priority: normal | Milestone: 3.9
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch commit close | Focuses: javascript, performance
------------------------------------+--------------------------------------
Changes (by netweb):
* keywords: has-patch commit => has-patch commit close
Comment:
Replying to [comment:18 azaozz]:
> Replying to [comment:16 netweb]:
> > This causes numerous issues with `npm install` on Windows installs :(
>
> Installs properly here on Win7.
After spending the best part of last hour of constantly running `npm
install` (after a `npm cache clean`) it looks like everything has
installed correctly. Looks like the errors were further upstream in not
downloading all the packages from `https://registry.npmjs.org`
All `grunt` tasks complete successfully with `Done, without errors.`
Replying to [comment:18 azaozz]:
> However I'm 50/50 on whether this should be running automatically on
each build. We are up to 46MB! of build tools (node_modules), 7,428 files
in 1,699 directories... The chances for failed updates, platform specific
bugs, local and platform differences, different output because of
different version of the build tools, etc. are quite high. Our build
process shouldn't be "fragile".
>
> Considering that new images are added to core only a few times per
cycle, seems this can be a "manual" task, i.e. should be run with `grunt
imagemin` only when needed.
In theory irrespective of platform we '''''should all''''' be using the
same build tool/s version/s per the `package.json` file, however we do
have to do an old fashioned grey matter ''remember to do task'' to run
`npm install` occasionly to add/update any tool/s changes in
`package.json`.
Forking [https://www.npmjs.org/package/github-update-checker github-
update-checker] could be a solution to this, compare versions in your
local `package.json` with the latest in the WordPress Core repo.
The task is only run manually as part of the `grunt precommit` task, it is
'''NOT''' part of the `grunt build` task.
{{{
// Pre-commit task.
grunt.registerTask('precommit', 'Runs front-end dev/test tasks in
preparation for a commit.',
['autoprefixer:core', 'imagemin:core', 'jshint', 'qunit:compiled']);
}}}
Added 'close' and this can be reclosed, worksforme :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/25169#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list