diff options
author | Thomas Park <thomas@thomaspark.me> | 2014-02-02 22:34:20 -0500 |
---|---|---|
committer | Thomas Park <thomas@thomaspark.me> | 2014-02-02 22:34:20 -0500 |
commit | 303ba425d14820c93528555c60b355fcc9e67df8 (patch) | |
tree | 2e277027cb9a929fefa84d87b621d3a3940ba863 /bower_components/bootstrap/test-infra/shrinkwrap.js | |
parent | 9fdf7a68d3f4f89e9ea9aea74c485ed31d767ee4 (diff) |
upgrade bootstrap to 3.1.0
Diffstat (limited to 'bower_components/bootstrap/test-infra/shrinkwrap.js')
-rw-r--r-- | bower_components/bootstrap/test-infra/shrinkwrap.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bower_components/bootstrap/test-infra/shrinkwrap.js b/bower_components/bootstrap/test-infra/shrinkwrap.js new file mode 100644 index 00000000..7a0328d4 --- /dev/null +++ b/bower_components/bootstrap/test-infra/shrinkwrap.js @@ -0,0 +1,24 @@ +/* jshint node: true */ + +/* +This Grunt task updates the npm-shrinkwrap.canonical.json file that's used as the key for Bootstrap's npm packages cache. +This task should be run and the updated file should be committed whenever Bootstrap's dependencies change. +*/ + +var canonicallyJsonStringify = require('canonical-json'); +var NON_CANONICAL_FILE = 'npm-shrinkwrap.json'; +var DEST_FILE = 'test-infra/npm-shrinkwrap.canonical.json'; + + +function updateShrinkwrap(grunt) { + // Assumption: Non-canonical shrinkwrap already generated by prerequisite Grunt task + var shrinkwrapData = grunt.file.readJSON(NON_CANONICAL_FILE); + grunt.log.writeln('Deleting ' + NON_CANONICAL_FILE.cyan + '...'); + grunt.file.delete(NON_CANONICAL_FILE); + // Output as Canonical JSON in correct location + grunt.file.write(DEST_FILE, canonicallyJsonStringify(shrinkwrapData)); + grunt.log.writeln('File ' + DEST_FILE.cyan + ' updated.'); +} + + +module.exports = updateShrinkwrap; |