Browse Source

Updated gruntfile

Sergio Brighenti 5 years ago
parent
commit
3a160e61a6
1 changed files with 7 additions and 3 deletions
  1. 7 3
      Gruntfile.js

+ 7 - 3
Gruntfile.js

@@ -1,9 +1,14 @@
 module.exports = function (grunt) {
 module.exports = function (grunt) {
+    let version = grunt.file.readJSON('composer.json').version;
+    let releaseFilename = 'release-v' + version + '.zip';
     grunt.initConfig({
     grunt.initConfig({
         pkg: grunt.file.readJSON('package.json'),
         pkg: grunt.file.readJSON('package.json'),
 
 
         jshint: {
         jshint: {
-            all: ['Gruntfile.js', 'src/js/app.js']
+            all: ['Gruntfile.js', 'src/js/app.js'],
+            options: {
+                'esversion': 6,
+            }
         },
         },
 
 
         cssmin: {
         cssmin: {
@@ -94,9 +99,8 @@ module.exports = function (grunt) {
                 ],
                 ],
             },
             },
         },
         },
-
         zip: {
         zip: {
-            'release.zip': [
+            [releaseFilename]: [
                 'app/**/*',
                 'app/**/*',
                 'bin/**/*',
                 'bin/**/*',
                 'bootstrap/**/*',
                 'bootstrap/**/*',