]> source.dussan.org Git - sonarqube.git/commitdiff
speed up uglify js step
authorStas Vilchik <vilchiks@gmail.com>
Fri, 20 Feb 2015 13:58:26 +0000 (14:58 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Fri, 20 Feb 2015 14:00:29 +0000 (15:00 +0100)
server/sonar-web/Gruntfile.coffee
server/sonar-web/package.json

index 840d2784188081c598ee1f915b4c663564874fda..7b3be526566263471a23371a2f848ffa61a7d9d8 100644 (file)
@@ -1,4 +1,6 @@
 module.exports = (grunt) ->
+  require('jit-grunt')(grunt);
+
   pkg = grunt.file.readJSON('package.json')
   expressPort = '<%= grunt.option("port") || 3000 %>'
 
@@ -348,7 +350,7 @@ module.exports = (grunt) ->
         src: ['<%= grunt.option("file") %>']
 
 
-    uglify:
+    uglify_parallel:
       build:
         files: [
           expand: true
@@ -394,29 +396,13 @@ module.exports = (grunt) ->
 
 
 
-  # Load grunt-contrib-* plugins
-  grunt.loadNpmTasks 'grunt-contrib-less'
-  grunt.loadNpmTasks 'grunt-css-url-rewrite'
-  grunt.loadNpmTasks 'grunt-contrib-coffee'
-  grunt.loadNpmTasks 'grunt-contrib-uglify'
-  grunt.loadNpmTasks 'grunt-contrib-requirejs'
-  grunt.loadNpmTasks 'grunt-contrib-handlebars'
-  grunt.loadNpmTasks 'grunt-contrib-watch'
-  grunt.loadNpmTasks 'grunt-contrib-clean'
-  grunt.loadNpmTasks 'grunt-contrib-copy'
-  grunt.loadNpmTasks 'grunt-contrib-concat'
-  grunt.loadNpmTasks 'grunt-contrib-jshint'
-  grunt.loadNpmTasks 'grunt-express-server'
-  grunt.loadNpmTasks 'grunt-casper'
-
-
   # Define tasks
   grunt.registerTask 'dev',
       ['clean:css', 'clean:js', 'less:dev', 'coffee:build', 'handlebars:build', 'copy:js', 'concat:dev']
 
   grunt.registerTask 'build',
       ['clean:css', 'clean:js', 'less:build', 'cssUrlRewrite:build', 'coffee:build', 'handlebars:build', 'copy:js',
-       'concat:build', 'requirejs', 'clean:js', 'copy:build', 'copy:requirejs', 'uglify:build', 'clean:build']
+       'concat:build', 'requirejs', 'clean:js', 'copy:build', 'copy:requirejs', 'uglify_parallel:build', 'clean:build']
 
   grunt.registerTask 'default',
       ['build']
index 4dbf1d07fcffb5118566587886f7ee6fc8f6a31b..f9beeb0882aafe834ac550262677db4acc9cd1ec 100644 (file)
@@ -20,7 +20,9 @@
     "grunt-contrib-watch": "0.5.3",
     "grunt-css-url-rewrite": "0.3.5",
     "grunt-express-server": "0.4.17",
+    "grunt-uglify-parallel": "0.0.1",
     "jade": "1.4.2",
+    "jit-grunt": "0.9.1",
     "phantomjs": "1.9.7-12",
     "serve-static": "1.5.0"
   },