Skip to content

Commit

Permalink
Use vanilla npm shrinkwrap instead of uber/npm-shrinkwrap; fixes #18559
Browse files Browse the repository at this point in the history
Ports #19604 to v3.

Special thanks to @kikinteractive, @azer, and @npm.
  • Loading branch information
cvrebert committed Mar 24, 2016
1 parent 1a906a8 commit 0af30aa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
17 changes: 0 additions & 17 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ module.exports = function (grunt) {

var fs = require('fs');
var path = require('path');
var npmShrinkwrap = require('npm-shrinkwrap');
var generateGlyphiconsData = require('./grunt/bs-glyphicons-data-generator.js');
var BsLessdocParser = require('./grunt/bs-lessdoc-parser.js');
var getLessVarsData = function () {
Expand Down Expand Up @@ -493,20 +492,4 @@ module.exports = function (grunt) {
grunt.registerTask('docs-github', ['jekyll:github', 'htmlmin']);

grunt.registerTask('prep-release', ['dist', 'docs', 'docs-github', 'compress']);

// 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();
});
});
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -55,7 +56,6 @@
"grunt-saucelabs": "~8.6.2",
"load-grunt-tasks": "~3.4.1",
"markdown-it": "^6.0.0",
"npm-shrinkwrap": "^200.4.0",
"shelljs": "^0.6.0",
"time-grunt": "^1.3.0"
},
Expand Down

0 comments on commit 0af30aa

Please sign in to comment.