summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-05-06 11:01:06 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-05-06 15:32:53 +0200
commit3aac5f8c828f3b91c559369d3927b53a03d2e240 (patch)
treebc61585a9fc131160bc09925d22ca1626742deb8
parenta53f8d2194bb62097fb9db125994330fc2d45140 (diff)
downloadsonarqube-3aac5f8c828f3b91c559369d3927b53a03d2e240.tar.gz
sonarqube-3aac5f8c828f3b91c559369d3927b53a03d2e240.zip
faster grunt build
-rw-r--r--server/sonar-web/Gruntfile.coffee50
-rw-r--r--server/sonar-web/package.json1
2 files changed, 31 insertions, 20 deletions
diff --git a/server/sonar-web/Gruntfile.coffee b/server/sonar-web/Gruntfile.coffee
index 2c631a6b01a..ba4233e66ad 100644
--- a/server/sonar-web/Gruntfile.coffee
+++ b/server/sonar-web/Gruntfile.coffee
@@ -13,24 +13,8 @@ module.exports = (grunt) ->
pkg: grunt.file.readJSON('package.json')
less:
- dev:
- files:
- '<%= grunt.option("assetsDir") || pkg.assets %>css/sonar.css': [
- '<%= pkg.sources %>less/jquery-ui.less'
- '<%= pkg.sources %>less/select2.less'
- '<%= pkg.sources %>less/select2-sonar.less'
-
- '<%= pkg.sources %>less/init.less'
- '<%= pkg.sources %>less/components.less'
- '<%= pkg.sources %>less/pages.less'
-
- '<%= pkg.sources %>less/style.less'
-
- '<%= pkg.sources %>less/*.less'
- ]
build:
- options:
- cleancss: true
+ options: cleancss: true
files:
'<%= grunt.option("assetsDir") || pkg.assets %>css/sonar.css': [
'<%= pkg.sources %>less/jquery-ui.less'
@@ -253,6 +237,32 @@ module.exports = (grunt) ->
out: '<%= grunt.option("assetsDir") || pkg.assets %>build/js/markdown/app.js'
+ parallel:
+ compile:
+ options: grunt: true
+ tasks: ['less:build', 'coffee:build', 'handlebars:build']
+ requirejs:
+ options: grunt: true
+ tasks: [
+ 'requirejs:qualityGate'
+ 'requirejs:qualityProfiles'
+ 'requirejs:codingRules'
+ 'requirejs:issues'
+ 'requirejs:issuesContext'
+ 'requirejs:measures'
+ 'requirejs:selectList'
+ 'requirejs:apiDocumentation'
+ 'requirejs:drilldown'
+ 'requirejs:sourceViewer'
+ 'requirejs:design'
+ 'requirejs:libraries'
+ 'requirejs:monitoring'
+ 'requirejs:nav'
+ 'requirejs:issueFilterWidget'
+ 'requirejs:markdown'
+ ]
+
+
handlebars:
options:
namespace: 'Templates'
@@ -464,11 +474,11 @@ module.exports = (grunt) ->
# Define tasks
grunt.registerTask 'dev',
- ['clean:css', 'clean:js', 'less:dev', 'coffee:build', 'handlebars:build', 'copy:js', 'concat:dev']
+ ['clean:css', 'clean:js', 'parallel:compile', '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_parallel:build', 'clean:build']
+ ['clean:css', 'clean:js', 'parallel:compile', 'cssUrlRewrite:build', 'copy:js',
+ 'concat:build', 'parallel:requirejs', 'clean:js', 'copy:build', 'copy:requirejs', 'uglify_parallel:build', 'clean:build']
grunt.registerTask 'default',
['build']
diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json
index 95d71cff799..13fc93dcc2e 100644
--- a/server/sonar-web/package.json
+++ b/server/sonar-web/package.json
@@ -21,6 +21,7 @@
"grunt-css-url-rewrite": "0.3.5",
"grunt-curl": "2.1.0",
"grunt-express-server": "0.4.17",
+ "grunt-parallel": "0.4.1",
"grunt-text-replace": "0.4.0",
"grunt-uglify-parallel": "0.0.1",
"grunt-zip": "0.16.2",