Updated toolchain to work properly with ES6 syntax
Change-Id: Iefb8bfb20fc57a34beeec136b0a2c4433d951e17
diff --git a/Gruntfile.js b/Gruntfile.js
index 1518cff..454faef 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -23,12 +23,13 @@
// Generate requireJS files for l10n
var reqTasks = [];
+ var uglyFiles = {};
for (var i in {'en' : 0, 'de' : 1}) {
reqTasks.push({
options: {
- // optimize: "uglify",
+ optimize: "none",
baseUrl: 'dev/js/src',
paths : {
'lib': '../lib',
@@ -40,12 +41,19 @@
include : [includeFile, "app/" + i],
out: 'public/js/kalamar-<%= pkg.version %>-' + i + '.js'
}
- })
+ });
+
+ uglyFiles['public/js/kalamar-<%= pkg.version %>-' + i + '.js'] = ['public/js/kalamar-<%= pkg.version %>-' + i + '.js'];
};
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
requirejs: reqTasks,
+ uglify: {
+ kalamar : {
+ files: uglyFiles
+ }
+ },
imagemin: {
dynamic: {
files: [{
@@ -68,20 +76,6 @@
}
}
},
- jasmine: {
- pivotal: {
- src: [
- 'dev/js/src/menu.js',
- 'dev/js/src/match.js',
- 'dev/js/src/hint.js',
- 'dev/js/src/vc.js'
- ],
- options: {
- specs: 'dev/js/spec/*Spec.js',
- vendor: ['dev/js/lib/require.js']
- }
- }
- },
// see https://github.com/gruntjs/grunt-contrib-copy/issues/64
// for copying binary files
copy : {
@@ -141,16 +135,15 @@
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-sass');
- grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-copy');
+ grunt.loadNpmTasks('grunt-contrib-uglify-es');
grunt.loadNpmTasks('grunt-contrib-requirejs');
- grunt.registerTask('default', ['requirejs']);
grunt.registerTask('img', ['imagemin','copy']);
grunt.registerTask('js', ['requirejs']);
grunt.registerTask('css', ['sass']);
grunt.registerTask(
'default',
- ['requirejs', 'imagemin', 'copy', 'sass']
+ ['requirejs', 'uglify', 'imagemin', 'copy', 'sass']
);
};