From 3129064ef30aac4adcc821c5c16605d16d5b924c Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 5 Feb 2015 14:36:38 -0800 Subject: [PATCH] added jake task to build 'node-webkit' app --- .gitignore | 3 +++ Jakefile | 26 ++++++++++++++++++++++++++ node-webkit/package.json | 7 ++++--- package.json | 3 ++- 4 files changed, 35 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 103b42d6..50e75d7f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,9 @@ node_modules npm-debug.log +# node-webkit-builder +nw_cache + # shell cdn-cache tdconfig.json diff --git a/Jakefile b/Jakefile index 77d8b389..9cbdb30e 100644 --- a/Jakefile +++ b/Jakefile @@ -322,5 +322,31 @@ task('update-docs', [ 'build/client.js', 'default' ], { async: true }, function( ) }) +task('nw', [ 'default' ], { async : true }, function() { + console.log('[I] building nw packages') + jake.mkdirP('build/nw'); + ['node-webkit/app.html', + 'node-webkit/logo.png', + 'node-webkit/package.json', + 'build/browser.js', + 'build/main.js', + 'build/shell.js', + 'build/runtime.js', + 'css/default.css', + 'css/editor.css'].forEach(function(f) { jake.cpR(f, 'build/nw') }) + var nwBuilder = require('node-webkit-builder'); + var nw = new nwBuilder({ + files: 'build/nw/**', + platforms: ['win32'], //['osx32', 'osx64', 'win32', 'win64'], + buildDir: 'build/nw_build', + cacheDir: 'nw_cache', + }); + nw.on('log', console.log); + nw.build().then(function () { + console.log('[I] nw packaged'); + complete(); + }); +}) + // vim: ft=javascript diff --git a/node-webkit/package.json b/node-webkit/package.json index 17e29138..80a2adb6 100644 --- a/node-webkit/package.json +++ b/node-webkit/package.json @@ -1,6 +1,7 @@ { - "main": "app.html", "name": "TouchDevelop", + "version": "3.3.0", + "main": "app.html", "node-main": "shell.js", "description": "TouchDevelop is a mobile and cloud friendly app creation environment.", "keywords": [ "TouchDevelop", "coding", "apps", "education" ], @@ -16,11 +17,11 @@ "resizable":true }, "licenses": [{ - "type": "MIT", + "type": "MIT" }], "repositories": [{ "type": "git", "url": "http://github.com/microsoft/TouchDevelop.git", - "path": "nw" + "path": "node-webkit" }] } diff --git a/package.json b/package.json index 9c784aac..610acdeb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "devDependencies": { "jake": "latest", - "typescript": "latest" + "typescript": "latest", + "node-webkit-builder":"latest" }, "dependencies": { "tsd": "^0.5.7"