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']
);
};
diff --git a/package.json b/package.json
index 5238789..e54a66e 100755
--- a/package.json
+++ b/package.json
@@ -1,22 +1,22 @@
{
"name": "Kalamar",
"description": "Mojolicious-based Frontend for KorAP",
- "license" : "BSD-2-Clause",
- "version": "0.27.2",
- "repository" : {
+ "license": "BSD-2-Clause",
+ "version": "0.27.3",
+ "repository": {
"type": "git",
"url": "https://github.com/KorAP/Kalamar.git"
},
"devDependencies": {
- "grunt": "^1.0.1",
- "grunt-contrib-copy": "^1.0.0",
- "grunt-contrib-imagemin": "^2.0.1",
- "imagemin": "^5.3.1",
- "grunt-contrib-jasmine": "^1.1.0",
- "grunt-contrib-sass": "^1.0.0",
- "grunt-contrib-watch": "^1.0.0",
+ "grunt": "^1.0.3",
+ "grunt-contrib-copy": "^1.0.0",
+ "grunt-contrib-imagemin": "^2.0.1",
"grunt-contrib-requirejs": "^1.0.0",
- "vinyl-fs": "^3.0.2",
- "optipng-bin": "^4.0.0"
+ "grunt-contrib-sass": "^1.0.0",
+ "grunt-contrib-uglify-es": "^3.3.0",
+ "grunt-contrib-watch": "^1.1.0",
+ "imagemin": "^5.3.1",
+ "optipng-bin": "^4.0.0",
+ "vinyl-fs": "^3.0.2"
}
}