diff options
| author | fat <[email protected]> | 2015-05-06 13:34:14 -0700 |
|---|---|---|
| committer | fat <[email protected]> | 2015-05-06 13:34:14 -0700 |
| commit | d1fbe200f46002431cdeebf965c4b789ef7ed267 (patch) | |
| tree | 43a7cc7667492e519b906f8a428935da2972ac14 /Gruntfile.js | |
| parent | 09fb80568a52af6c440db971cdc6fd88eab8f8b5 (diff) | |
| download | bootstrap-d1fbe200f46002431cdeebf965c4b789ef7ed267.tar.xz bootstrap-d1fbe200f46002431cdeebf965c4b789ef7ed267.zip | |
remove closureness from plugins
Diffstat (limited to 'Gruntfile.js')
| -rw-r--r-- | Gruntfile.js | 74 |
1 files changed, 16 insertions, 58 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index a54d4781b..f3c3af8f8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -108,80 +108,38 @@ module.exports = function (grunt) { }, bootstrap: { src: [ - 'js/util.js', + 'js/transition.js', 'js/alert.js', 'js/button.js', 'js/carousel.js', 'js/collapse.js', 'js/dropdown.js', 'js/modal.js', - 'js/scrollspy.js', 'js/tooltip.js', 'js/popover.js', - 'js/tab.js' + 'js/scrollspy.js', + 'js/tab.js', + 'js/affix.js' ], dest: 'dist/js/<%= pkg.name %>.js' } }, - closureCompiler: { - + uglify: { options: { - compilerFile: require('superstartup-closure-compiler').getPath(), - checkModified: false, - - compilerOpts: { - // jscs:disable requireCamelCaseOrUpperCaseIdentifiers - // jscomp_warning: 'reportUnknownTypes', someday - maybe we will get to 100% typed, this helps track those down - compilation_level: 'ADVANCED_OPTIMIZATIONS', - warning_level: 'verbose', - summary_detail_level: 3, - output_wrapper: - '"<%= banner %><%= jqueryCheck %><%= jqueryVersionCheck %>' - + '(function($){%output%})(jQuery);"', - externs: 'js/externs/*.js' - // jscs:enable requireCamelCaseOrUpperCaseIdentifiers + compress: { + warnings: false }, - - execOpts: { - maxBuffer: 999999 * 1024 - }, - - // [OPTIONAL] Java VM optimization options - // see https://code.google.com/p/closure-compiler/wiki/FAQ#What_are_the_recommended_Java_VM_command-line_options? - // Setting one of these to 'true' is strongly recommended, - // and can reduce compile times by 50-80% depending on compilation size - // and hardware. - // On server-class hardware, such as with Github's Travis hook, - // TieredCompilation should be used; on standard developer hardware, - // d32 may be better. Set as appropriate for your environment. - // Default for both is 'false'; do not set both to 'true'. - d32: false, // will use 'java -client -d32 -jar compiler.jar' - TieredCompilation: false // will use 'java -server -XX:+TieredCompilation -jar compiler.jar' + mangle: true, + preserveComments: 'some' }, - - targetName: { - src: [ - 'js/util.js', - 'js/alert.js', - 'js/button.js', - 'js/carousel.js', - 'js/collapse.js', - 'js/dropdown.js', - 'js/modal.js', - 'js/scrollspy.js', - 'js/tooltip.js', - 'js/popover.js', - 'js/tab.js' - ], + core: { + src: '<%= concat.bootstrap.dest %>', dest: 'dist/js/<%= pkg.name %>.min.js' - } - - }, - - uglify: { - options: { - preserveComments: 'some' + }, + customize: { + src: configBridge.paths.customizerJs, + dest: 'docs/assets/js/customize.min.js' }, docsJs: { src: configBridge.paths.docsJs, @@ -443,7 +401,7 @@ module.exports = function (grunt) { grunt.registerTask('test-js', ['jshint:core', 'jshint:test', 'jshint:grunt', 'jscs:core', 'jscs:test', 'jscs:grunt', 'qunit']); // JS distribution task. - grunt.registerTask('dist-js', ['concat', 'closureCompiler', 'commonjs']); + grunt.registerTask('dist-js', ['concat', 'uglify:core', 'commonjs']); grunt.registerTask('test-scss', ['scsslint:scss']); |
