diff options
Diffstat (limited to 'Gruntfile.js')
| -rw-r--r-- | Gruntfile.js | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index 5f7b6b342..de945ab3c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,7 +1,7 @@ /*! * Bootstrap's Gruntfile * http://getbootstrap.com - * Copyright 2013-2014 Twitter, Inc. + * Copyright 2013-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ @@ -18,6 +18,7 @@ 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 () { var filePath = path.join(__dirname, 'less/variables.less'); @@ -224,7 +225,7 @@ module.exports = function (grunt) { options: { compatibility: 'ie8', keepSpecialComments: '*', - noAdvanced: true + advanced: false }, minifyCore: { src: 'dist/css/<%= pkg.name %>.css', @@ -370,8 +371,9 @@ module.exports = function (grunt) { all: { options: { build: process.env.TRAVIS_JOB_ID, - concurrency: 10, + throttled: 10, maxRetries: 3, + maxPollRetries: 4, urls: ['http://127.0.0.1:3000/js/tests/index.html'], browsers: grunt.file.readYAML('grunt/sauce_browsers.yml') } @@ -382,7 +384,27 @@ module.exports = function (grunt) { npmUpdate: { command: 'npm update' } + }, + + compress: { + main: { + options: { + archive: 'bootstrap-<%= pkg.version %>-dist.zip', + mode: 'zip', + level: 9, + pretty: true + }, + files: [ + { + expand: true, + cwd: 'dist/', + src: ['**'], + dest: 'bootstrap-<%= pkg.version %>-dist' + } + ] + } } + }); @@ -444,6 +466,8 @@ module.exports = function (grunt) { // This can be overzealous, so its changes should always be manually reviewed! grunt.registerTask('change-version-number', 'sed'); + grunt.registerTask('build-glyphicons-data', function () { generateGlyphiconsData.call(this, grunt); }); + // task for building customizer grunt.registerTask('build-customizer', ['build-customizer-html', 'build-raw-files']); grunt.registerTask('build-customizer-html', 'jade'); @@ -463,9 +487,9 @@ module.exports = function (grunt) { grunt.registerTask('lint-docs-css', ['csslint:docs', 'csslint:examples']); grunt.registerTask('docs-js', ['uglify:docsJs', 'uglify:customize']); grunt.registerTask('lint-docs-js', ['jshint:assets', 'jscs:assets']); - grunt.registerTask('docs', ['docs-css', 'lint-docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs', 'build-customizer']); + grunt.registerTask('docs', ['docs-css', 'lint-docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs', 'build-glyphicons-data', 'build-customizer']); - grunt.registerTask('docs-github', ['jekyll:github']); + grunt.registerTask('prep-release', ['jekyll: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. |
