Make desktop app directory with all nedded files before build it.

This commit is contained in:
Filipe Vieira 2014-05-01 01:00:10 +01:00
parent b2bdb252b7
commit 7fb5fe93fa
2 changed files with 17 additions and 6 deletions

View File

@ -158,6 +158,14 @@ module.exports = function(grunt) {
}, },
src: ['./**/*'] 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'); grunt.config.set('leadingIndent.indentation', 'spaces');
@ -179,6 +187,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-ghost'); grunt.loadNpmTasks('grunt-ghost');
grunt.loadNpmTasks('grunt-leading-indent'); grunt.loadNpmTasks('grunt-leading-indent');
grunt.loadNpmTasks('grunt-node-webkit-builder'); grunt.loadNpmTasks('grunt-node-webkit-builder');
grunt.loadNpmTasks('grunt-contrib-copy');
// Validate // Validate
grunt.registerTask('lint', ['leadingIndent:jsFiles', 'leadingIndent:cssFiles', 'jshint']); grunt.registerTask('lint', ['leadingIndent:jsFiles', 'leadingIndent:cssFiles', 'jshint']);
@ -201,5 +210,6 @@ module.exports = function(grunt) {
grunt.registerTask('serve', ['connect:serve']); grunt.registerTask('serve', ['connect:serve']);
// Build stand alone app with nodewebkit // Build stand alone app with nodewebkit
grunt.registerTask('nw', ['nodewebkit']); grunt.registerTask('desktop', ['compile', 'merge', 'copy:desktop', 'nodewebkit']);
}; };

View File

@ -1,7 +1,7 @@
{ {
"author": "Julian Descottes, Vincent Renaudin", "author": "Julian Descottes, Vincent Renaudin",
"name": "piskel", "name": "piskel",
"main": "./src/index.html", "main": "./desktop/index.html",
"description": "Web based 2d animations editor", "description": "Web based 2d animations editor",
"version": "0.0.1", "version": "0.0.1",
"homepage": "http://github.com/juliandescottes/piskel", "homepage": "http://github.com/juliandescottes/piskel",
@ -22,7 +22,8 @@
"grunt-ghost": "1.0.12", "grunt-ghost": "1.0.12",
"grunt-leading-indent": "0.1.0", "grunt-leading-indent": "0.1.0",
"grunt-closure-tools": "~0.8.3", "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": { "window": {
"toolbar": false "toolbar": false