From 3efa2f6460dd26171e5597a1829e2d3e7ca3b733 Mon Sep 17 00:00:00 2001 From: Timo Aho Date: Sat, 31 Oct 2015 21:09:48 +0200 Subject: [PATCH] Source maps --- client/package.json | 2 ++ server/etc/process-config.json | 8 +++++--- server/gulpfile.js | 4 ++-- server/package.json | 3 ++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/client/package.json b/client/package.json index 8413047..9586d17 100644 --- a/client/package.json +++ b/client/package.json @@ -4,6 +4,7 @@ "license": "GPL-3.0", "description": "Leap Motion gesture input mapper", "main": "index.html", + "node-remote": "127.0.0.1", "scripts": { "nw-gyp": "nw-gyp/bin/nw-gyp.js", "coffee": "node_modules/coffee-script/bin/coffee", @@ -26,6 +27,7 @@ "gulp": "^3.9.0", "gulp-coffee": "^2.3.1", "gulp-sourcemaps": "^1.6.0", + "gulp-util": "^3.0.7", "nw-gyp": "^0.12.3" }, "repository": { diff --git a/server/etc/process-config.json b/server/etc/process-config.json index 8551fb4..2e5e02e 100644 --- a/server/etc/process-config.json +++ b/server/etc/process-config.json @@ -1,11 +1,13 @@ { "apps" : [{ "name": "leapgim-server", - "script": "server/index.js", + "script": "src/FrameController.coffee", "cwd": "server", + "autorestart": true, + "restart_delay": 4000, "exec_mode": "fork_mode", - "exec_interpreter": "node", - "watch": false, + "exec_interpreter": "coffee", + "watch": true, "merge_logs": true }] } diff --git a/server/gulpfile.js b/server/gulpfile.js index 42e4cd2..fd90da9 100644 --- a/server/gulpfile.js +++ b/server/gulpfile.js @@ -6,8 +6,8 @@ var gulp = require('gulp') gulp.task('compile-coffee', function () { gulp.src('./src/*.coffee') .pipe(sourcemaps.init()) - .pipe(coffee()) - .pipe(sourcemaps.write()) + .pipe(coffee({ bare: true })).on('error', gutil.log) + .pipe(sourcemaps.write("./maps")) .pipe(gulp.dest('./lib')); }); gulp.task('reload', function() { diff --git a/server/package.json b/server/package.json index d05bf04..185e3c8 100644 --- a/server/package.json +++ b/server/package.json @@ -23,6 +23,7 @@ "devDependencies": { "gulp": "^3.9.0", "gulp-coffee": "^2.3.1", - "gulp-sourcemaps": "^1.6.0" + "gulp-sourcemaps": "^1.6.0", + "source-map-support": "^0.3.3" } }