mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
Use vanilla npm shrinkwrap instead of uber/npm-shrinkwrap; fixes #18559
This commit is contained in:
parent
d34a643621
commit
768dac2e87
17
Gruntfile.js
17
Gruntfile.js
@ -18,7 +18,6 @@ module.exports = function (grunt) {
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var isTravis = require('is-travis');
|
||||
var npmShrinkwrap = require('npm-shrinkwrap');
|
||||
var mq4HoverShim = require('mq4-hover-shim');
|
||||
var autoprefixerSettings = require('./grunt/autoprefixer-settings.js');
|
||||
var autoprefixer = require('autoprefixer')(autoprefixerSettings);
|
||||
@ -490,20 +489,4 @@ module.exports = function (grunt) {
|
||||
|
||||
// Publish to GitHub
|
||||
grunt.registerTask('publish', ['buildcontrol:pages']);
|
||||
|
||||
// Task for updating the cached npm packages used by the Travis build (which are controlled by test-infra/npm-shrinkwrap.json).
|
||||
// This task should be run and the updated file should be committed whenever Bootstrap's dependencies change.
|
||||
grunt.registerTask('update-shrinkwrap', ['exec:npmUpdate', '_update-shrinkwrap']);
|
||||
grunt.registerTask('_update-shrinkwrap', function () {
|
||||
var done = this.async();
|
||||
npmShrinkwrap({ dev: true, dirname: __dirname }, function (err) {
|
||||
if (err) {
|
||||
grunt.fail.warn(err);
|
||||
}
|
||||
var dest = 'grunt/npm-shrinkwrap.json';
|
||||
fs.renameSync('npm-shrinkwrap.json', dest);
|
||||
grunt.log.writeln('File ' + dest.cyan + ' updated.');
|
||||
done();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
@ -15,6 +15,7 @@
|
||||
"author": "Twitter, Inc.",
|
||||
"scripts": {
|
||||
"change-version": "node grunt/change-version.js",
|
||||
"shrinkwrap": "npm shrinkwrap --dev && mv ./npm-shrinkwrap.json ./grunt/npm-shrinkwrap.json",
|
||||
"test": "grunt test"
|
||||
},
|
||||
"style": "dist/css/bootstrap.css",
|
||||
@ -62,7 +63,6 @@
|
||||
"is-travis": "^1.0.0",
|
||||
"load-grunt-tasks": "^3.4.0",
|
||||
"mq4-hover-shim": "^0.3.0",
|
||||
"npm-shrinkwrap": "^200.1.0",
|
||||
"shelljs": "^0.6.0",
|
||||
"time-grunt": "^1.2.1"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user