diff --git a/Gruntfile.js b/Gruntfile.js index 620c64f..8edfc44 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,6 +3,7 @@ module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), + manifest: grunt.file.readJSON('Mobile/manifest.webapp'), uglify: { main: { files: [ @@ -93,6 +94,23 @@ module.exports = function(grunt) { } }, + zip: { + mobile: { + router: function(path) { + return /build\/mobile\/(.*)/.exec(path)[1]; + }, + src: 'build/mobile/**', + dest: 'build/sketchy-mobile-<%= manifest.version %>.zip' + }, + web: { + router: function(path) { + return /build\/web\/(.*)/.exec(path)[1]; + }, + src: 'build/web/**', + dest: 'build/sketchy-web-<%= manifest.version %>.zip' + } + }, + watch: { js: { files: ['Shared/js/**', 'Mobile/js/**', 'Web/js/**'], @@ -122,6 +140,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.registerTask('default', ['uglify','copy', 'less']) + grunt.loadNpmTasks('grunt-zip'); + grunt.registerTask('default', ['uglify','copy', 'less', 'zip']) } diff --git a/Mobile/Sketchy-1.1.zip b/Mobile/Sketchy-1.1.zip deleted file mode 100755 index 0652bc8..0000000 Binary files a/Mobile/Sketchy-1.1.zip and /dev/null differ diff --git a/Mobile/Sketchy-1.2.zip b/Mobile/Sketchy-1.2.zip deleted file mode 100644 index 7f88727..0000000 Binary files a/Mobile/Sketchy-1.2.zip and /dev/null differ diff --git a/Mobile/Sketchy-1.zip b/Mobile/Sketchy-1.zip deleted file mode 100755 index fa49516..0000000 Binary files a/Mobile/Sketchy-1.zip and /dev/null differ diff --git a/build/mobile/js/Untitled Document b/build/mobile/js/Untitled Document deleted file mode 100644 index e69de29..0000000 diff --git a/package.json b/package.json index cfb1c80..f3e7b10 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "grunt-contrib-less": "~0.9.0", "grunt-contrib-uglify": "~0.2.2", "grunt-contrib-copy": "~0.5.0", - "grunt-contrib-watch": "~0.5.3" + "grunt-contrib-watch": "~0.5.3", + "grunt-zip": "~0.12.0" }, "keywords": [ "Sketch", @@ -24,7 +25,4 @@ ], "author": "Mahdi Dibaiee", "license": "GPL V2", - "devDependencies": { - "grunt": "~0.4.2" - } }