aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2014-04-01 17:35:55 +0600
committerStas Vilchik <vilchiks@gmail.com>2014-04-01 17:36:08 +0600
commiteb4f29a496c1eaf4a2fb9f2023c163aff43a6ce8 (patch)
tree99d66288f53d9c848027b1c6cb153c547ba70ccc
parente9a64bc56c10b077fbcc5c62fd0a264f93ccdab8 (diff)
downloadsonarqube-eb4f29a496c1eaf4a2fb9f2023c163aff43a6ce8.tar.gz
sonarqube-eb4f29a496c1eaf4a2fb9f2023c163aff43a6ce8.zip
Grunt: use concat instead of uglify for dev mode
-rw-r--r--sonar-server/Gruntfile.coffee16
-rw-r--r--sonar-server/package.json3
2 files changed, 11 insertions, 8 deletions
diff --git a/sonar-server/Gruntfile.coffee b/sonar-server/Gruntfile.coffee
index e1f4ae0dfe1..780d0b09d2b 100644
--- a/sonar-server/Gruntfile.coffee
+++ b/sonar-server/Gruntfile.coffee
@@ -53,19 +53,17 @@ module.exports = (grunt) ->
]
- uglify:
+ concat:
dev:
- options:
- beautify: true
files:
'<%= pkg.assets %>js/sonar.js': [
+ '<%= pkg.assets %>js/translate.js'
'<%= pkg.assets %>js/third-party/jquery.js'
'<%= pkg.assets %>js/third-party/jquery-ui.js'
'<%= pkg.assets %>js/third-party/d3.js'
'<%= pkg.assets %>js/third-party/underscore.js'
'<%= pkg.assets %>js/third-party/select2.js'
'<%= pkg.assets %>js/select2-jquery-ui-fix.js'
- '<%= pkg.assets %>js/translate.js'
'<%= pkg.assets %>js/widgets/widget.js'
'<%= pkg.assets %>js/widgets/bubble-chart.js'
'<%= pkg.assets %>js/widgets/timeline.js'
@@ -82,18 +80,21 @@ module.exports = (grunt) ->
'<%= pkg.assets %>js/issue.js'
'<%= pkg.assets %>js/recent-history.js'
]
+
+
+ uglify:
build:
options:
preserveComments: false # remove all comments
files:
'<%= pkg.assets %>build/js/sonar.js': [
+ '<%= pkg.assets %>js/translate.js'
'<%= pkg.assets %>js/third-party/jquery.js'
'<%= pkg.assets %>js/third-party/jquery-ui.js'
'<%= pkg.assets %>js/third-party/d3.js'
'<%= pkg.assets %>js/third-party/underscore.js'
'<%= pkg.assets %>js/third-party/select2.js'
'<%= pkg.assets %>js/select2-jquery-ui-fix.js'
- '<%= pkg.assets %>js/translate.js'
'<%= pkg.assets %>js/widgets/widget.js'
'<%= pkg.assets %>js/widgets/bubble-chart.js'
'<%= pkg.assets %>js/widgets/timeline.js'
@@ -214,7 +215,7 @@ module.exports = (grunt) ->
js:
files: '<%= pkg.sources %>js/**/*.js'
- tasks: ['copy:js', 'uglify:dev']
+ tasks: ['copy:js', 'concat:dev']
handlebars:
files: '<%= pkg.sources %>hbs/**/*.hbs'
@@ -231,13 +232,14 @@ module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-copy'
+ grunt.loadNpmTasks 'grunt-contrib-concat'
# Define tasks
grunt.registerTask 'dev', ['clean:css', 'clean:js',
'less:dev',
'coffee:build', 'handlebars:build', 'copy:js',
- 'uglify:dev']
+ 'concat:dev']
grunt.registerTask 'default', ['clean:css', 'clean:js',
diff --git a/sonar-server/package.json b/sonar-server/package.json
index 863e5e09e75..040a4dc5a74 100644
--- a/sonar-server/package.json
+++ b/sonar-server/package.json
@@ -17,7 +17,8 @@
"grunt-contrib-uglify": "^0.4.0",
"grunt-karma": "~0.6.2",
"grunt-contrib-clean": "^0.5.0",
- "grunt-contrib-copy": "^0.5.0"
+ "grunt-contrib-copy": "^0.5.0",
+ "grunt-contrib-concat": "^0.4.0"
},
"engines": {
"node": "~0.8 || ~0.10"