aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-08-04 14:40:25 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-08-04 14:40:25 +0200
commit5abbda8671afd4ba05653277e72b6a3005acff03 (patch)
treeb71a4fd860f978c5d6dad29f2da85ab3a1a9ca33 /server/sonar-web
parent0421e0a1699eef419ff6175278b5312bde2e8ccd (diff)
downloadsonarqube-5abbda8671afd4ba05653277e72b6a3005acff03.tar.gz
sonarqube-5abbda8671afd4ba05653277e72b6a3005acff03.zip
compile .jsx files
Diffstat (limited to 'server/sonar-web')
-rw-r--r--server/sonar-web/Gruntfile.coffee17
-rw-r--r--server/sonar-web/package.json1
2 files changed, 17 insertions, 1 deletions
diff --git a/server/sonar-web/Gruntfile.coffee b/server/sonar-web/Gruntfile.coffee
index a495f84fdc1..d324e5b63fc 100644
--- a/server/sonar-web/Gruntfile.coffee
+++ b/server/sonar-web/Gruntfile.coffee
@@ -36,6 +36,17 @@ module.exports = (grunt) ->
]
+ babel:
+ build:
+ files: [
+ expand: true
+ cwd: '<%= SOURCE_PATH %>/js'
+ src: ['**/*.jsx']
+ dest: '<%= BUILD_PATH %>/js'
+ ext: '.js'
+ ]
+
+
concat:
build:
files:
@@ -300,6 +311,10 @@ module.exports = (grunt) ->
files: '<%= SOURCE_PATH %>/js/**/*.js'
tasks: ['copy:js', 'concat:build', 'copy:assets-all-js']
+ jsx:
+ files: '<%= SOURCE_PATH %>/js/**/*.jsx'
+ tasks: ['babel:build', 'concat:build', 'copy:assets-all-js']
+
handlebars:
files: '<%= SOURCE_PATH %>/**/*.hbs'
tasks: ['handlebars:build', 'copy:assets-all-js']
@@ -307,7 +322,7 @@ module.exports = (grunt) ->
# Basic tasks
grunt.registerTask 'prepare',
- ['clean:css', 'clean:js', 'clean:build', 'less:build', 'handlebars:build', 'copy:js', 'concat:build']
+ ['clean:css', 'clean:js', 'clean:build', 'less:build', 'handlebars:build', 'copy:js', 'babel:build', 'concat:build']
grunt.registerTask 'build-fast-suffix',
['copy:assets-css', 'copy:assets-all-js']
diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json
index 44d05adaeac..f464079925c 100644
--- a/server/sonar-web/package.json
+++ b/server/sonar-web/package.json
@@ -3,6 +3,7 @@
"version": "0.0.1",
"devDependencies": {
"grunt": "0.4.5",
+ "grunt-babel": "5.0.1",
"grunt-cli": "0.1.13",
"grunt-concurrent": "1.0.0",
"grunt-contrib-clean": "0.6.0",