From 7fb5fe93faf4bfa2fb8ab1f3dd91640cba49d1ae Mon Sep 17 00:00:00 2001 From: Filipe Vieira Date: Thu, 1 May 2014 01:00:10 +0100 Subject: [PATCH] Make desktop app directory with all nedded files before build it. --- Gruntfile.js | 16 +++++++++++++--- package.json | 7 ++++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 9fdc708..88fd11c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -157,7 +157,15 @@ module.exports = function(grunt) { linux64: true }, src: ['./**/*'] - }, + }, + copy: { + desktop: { + files: [ + {expand: true, cwd: "build/", src: ['*'], dest: 'desktop/build/', filter: 'isFile'}, + {expand: true, cwd: "src/", src: ['**'], dest: 'desktop/'}, + ] + } + } }); grunt.config.set('leadingIndent.indentation', 'spaces'); @@ -179,7 +187,8 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-ghost'); grunt.loadNpmTasks('grunt-leading-indent'); grunt.loadNpmTasks('grunt-node-webkit-builder'); - + grunt.loadNpmTasks('grunt-contrib-copy'); + // Validate grunt.registerTask('lint', ['leadingIndent:jsFiles', 'leadingIndent:cssFiles', 'jshint']); @@ -201,5 +210,6 @@ module.exports = function(grunt) { grunt.registerTask('serve', ['connect:serve']); // Build stand alone app with nodewebkit - grunt.registerTask('nw', ['nodewebkit']); + grunt.registerTask('desktop', ['compile', 'merge', 'copy:desktop', 'nodewebkit']); + }; diff --git a/package.json b/package.json index 805859d..efb8683 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "author": "Julian Descottes, Vincent Renaudin", "name": "piskel", - "main": "./src/index.html", + "main": "./desktop/index.html", "description": "Web based 2d animations editor", "version": "0.0.1", "homepage": "http://github.com/juliandescottes/piskel", @@ -22,9 +22,10 @@ "grunt-ghost": "1.0.12", "grunt-leading-indent": "0.1.0", "grunt-closure-tools": "~0.8.3", - "grunt-node-webkit-builder": "~0.1.21" + "grunt-node-webkit-builder": "~0.1.21", + "grunt-contrib-copy": "~0.5.0" }, "window": { - "toolbar": false + "toolbar": false } }