1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-23 00:39:54 +00:00

Merge pull request #19604 from twbs/fix-18559

Use vanilla npm shrinkwrap instead of uber/npm-shrinkwrap
This commit is contained in:
Chris Rebert 2016-03-23 23:54:23 -07:00
commit 29552226bb
3 changed files with 104 additions and 1535 deletions

View File

@ -18,7 +18,6 @@ module.exports = function (grunt) {
var fs = require('fs'); var fs = require('fs');
var path = require('path'); var path = require('path');
var isTravis = require('is-travis'); var isTravis = require('is-travis');
var npmShrinkwrap = require('npm-shrinkwrap');
var mq4HoverShim = require('mq4-hover-shim'); var mq4HoverShim = require('mq4-hover-shim');
var autoprefixerSettings = require('./grunt/autoprefixer-settings.js'); var autoprefixerSettings = require('./grunt/autoprefixer-settings.js');
var autoprefixer = require('autoprefixer')(autoprefixerSettings); var autoprefixer = require('autoprefixer')(autoprefixerSettings);
@ -490,20 +489,4 @@ module.exports = function (grunt) {
// Publish to GitHub // Publish to GitHub
grunt.registerTask('publish', ['buildcontrol:pages']); 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();
});
});
}; };

1620
grunt/npm-shrinkwrap.json generated

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,7 @@
"author": "Twitter, Inc.", "author": "Twitter, Inc.",
"scripts": { "scripts": {
"change-version": "node grunt/change-version.js", "change-version": "node grunt/change-version.js",
"shrinkwrap": "npm shrinkwrap --dev && mv ./npm-shrinkwrap.json ./grunt/npm-shrinkwrap.json",
"test": "grunt test" "test": "grunt test"
}, },
"style": "dist/css/bootstrap.css", "style": "dist/css/bootstrap.css",
@ -62,7 +63,6 @@
"is-travis": "^1.0.0", "is-travis": "^1.0.0",
"load-grunt-tasks": "^3.4.0", "load-grunt-tasks": "^3.4.0",
"mq4-hover-shim": "^0.3.0", "mq4-hover-shim": "^0.3.0",
"npm-shrinkwrap": "^200.1.0",
"shelljs": "^0.6.0", "shelljs": "^0.6.0",
"time-grunt": "^1.2.1" "time-grunt": "^1.2.1"
}, },