We've tried various approaches to lock down our dependencies and they
have been flawed because dependencies in our included packages may not
be locked down and previous attempts to do that have not been correct.
With npm shrinkwrap we lock down versions so that any npm install will
always install the exact same versions for all developers - see:
https://docs.npmjs.com/cli/shrinkwrap
(This is a lot like composer.lock for those more fluent with composer)
A) Remove direct dependency on uglify-js:
This dependency was added in MDL-50277, but it isn't quite correct, the
way npm installs dependencies means that grunt-contrib-uglify *could* use
'our' version if its satisifed. But does not *always* and especially does
not if the grunt-contrib-uglify requirement is higher than ours.
Long story short, in many cases this means that this is used:
node_modules/grunt-contrib-uglify/node_modules/uglify-js
But this is not:
node_modules/uglify-js
In MDL-50277 we thought we were making the version sticky, but in
reality we were just fixing previous problems by updating
grunt-contrib-uglify to a version which fixed a bug:
https://github.com/gruntjs/grunt-contrib-uglify/issues/313
It seems the better solution will come with using npm shrinkwrap to lock
down depdencies.
B) Bump grunt-contrib-uglify to 0.11.0
This moves us to uglify-js ~2.6.0 - which doens't change any output
files.
This version of grunt-contrib-jshint itself uses a better fixed
requirement on "~2.8.0" rather than "^2.8.0" which was giving variable
results with some people updating to 2.9-rc1.
See also https://github.com/gruntjs/grunt-contrib-jshint/pull/219
* Introduce the 'css' task - this will give us flexibility to do things
in future rather than relying on the inbuilt 'less' task (e.g. sourcemap
generating task which doesn't run by default)
* Introduce 'amd' task which runs only amd tasks
* Introduce 'js' task which runs all JS (amd/shifter) tasks
* Tweak the ordering so that slow shifter always runs last (useful for
people like me who forget to specif the task)
Previously we were using recess to build bootstrap base as it was what
was used by the original project. But recess is no longer maintained.
Now we use grunt for building js, it makes sense to use it for less too.
(If you really don't want to use grunt, you almost certainly can just
use lessc -x as it uses the same less.js on backend).
On rewriting MDL-47491, we ended in a situation where these
modifications had been incorporated via merge commits. And kept
undetected by rebase -ip.
In general, please, use merge commits only for solving conflicts,
never as a replacement for fixup commits. To fix non-conflicting
things, add new, proper, fixup commits.