From 7cf3e1fbef01638bd0d509f39bb434b18ee509d0 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Thu, 14 Aug 2014 09:27:23 -0700 Subject: [PATCH] add worker bin to run_dev.js --- scripts/run_dev.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/run_dev.js b/scripts/run_dev.js index 49364c5..7800d5d 100644 --- a/scripts/run_dev.js +++ b/scripts/run_dev.js @@ -7,11 +7,22 @@ const cp = require('child_process'); const path = require('path'); +const mkdirp = require('mkdirp'); +const rimraf = require('rimraf'); + process.env.NODE_ENV = 'dev'; var child = cp.fork(path.join(__dirname, '..', 'bin', 'server.js')); child.on('exit', process.exit); - -child = cp.fork(path.join(__dirname, '..', 'bin', 'static.js')); +child = cp.fork(path.join(__dirname, '..', 'bin', 'worker.js')); child.on('exit', process.exit); + + +mkdirp.sync(path.join(__dirname, '..', 'var', 'public')); +child = cp.fork(path.join(__dirname, '..', 'bin', '_static.js')); +child.on('exit', process.exit); + +process.on('exit', function() { + rimraf.sync(path.join(__dirname, '..', 'var', 'public')); +});