mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-15 15:29:22 +01:00
Use vanilla npm shrinkwrap instead of uber/npm-shrinkwrap; fixes #18559
Ports #19604 to v3. Special thanks to @kikinteractive, @azer, and @npm.
This commit is contained in:
parent
1a906a8a19
commit
0af30aa65e
17
Gruntfile.js
17
Gruntfile.js
@ -17,7 +17,6 @@ module.exports = function (grunt) {
|
|||||||
|
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var npmShrinkwrap = require('npm-shrinkwrap');
|
|
||||||
var generateGlyphiconsData = require('./grunt/bs-glyphicons-data-generator.js');
|
var generateGlyphiconsData = require('./grunt/bs-glyphicons-data-generator.js');
|
||||||
var BsLessdocParser = require('./grunt/bs-lessdoc-parser.js');
|
var BsLessdocParser = require('./grunt/bs-lessdoc-parser.js');
|
||||||
var getLessVarsData = function () {
|
var getLessVarsData = function () {
|
||||||
@ -493,20 +492,4 @@ module.exports = function (grunt) {
|
|||||||
grunt.registerTask('docs-github', ['jekyll:github', 'htmlmin']);
|
grunt.registerTask('docs-github', ['jekyll:github', 'htmlmin']);
|
||||||
|
|
||||||
grunt.registerTask('prep-release', ['dist', 'docs', 'docs-github', 'compress']);
|
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();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
@ -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",
|
||||||
@ -55,7 +56,6 @@
|
|||||||
"grunt-saucelabs": "~8.6.2",
|
"grunt-saucelabs": "~8.6.2",
|
||||||
"load-grunt-tasks": "~3.4.1",
|
"load-grunt-tasks": "~3.4.1",
|
||||||
"markdown-it": "^6.0.0",
|
"markdown-it": "^6.0.0",
|
||||||
"npm-shrinkwrap": "^200.4.0",
|
|
||||||
"shelljs": "^0.6.0",
|
"shelljs": "^0.6.0",
|
||||||
"time-grunt": "^1.3.0"
|
"time-grunt": "^1.3.0"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user