Install bower packages and brunch build on npm install.

`npm run dev` now gives you a brunch watch that is also running the dev server
This commit is contained in:
Rob 2015-10-21 16:12:55 -07:00
parent 57c5384ec1
commit 2275c78b2d
3 changed files with 14 additions and 5 deletions

View file

@ -43,6 +43,10 @@ exports.config =
watcher:
usePolling: true
server:
port: 3000
path: 'server.coffee'
files:
javascripts:
defaultExtension: 'coffee'

View file

@ -32,7 +32,11 @@
"start": "node ./index.js",
"test": "./node_modules/.bin/karma start",
"predeploy": "echo Starting deployment--hold onto your butts.; echo Skipping brunch build --production",
"postdeploy": "echo Deployed. Unclench."
"postdeploy": "echo Deployed. Unclench.",
"postinstall": "bower install && brunch build",
"brunch": "brunch",
"bower": "bower",
"dev": "brunch watch --server"
},
"main": "index.js",
"keywords": [

View file

@ -8,11 +8,12 @@ http = require 'http'
log = require 'winston'
serverSetup = require './server_setup'
module.exports.startServer = ->
module.exports.startServer = (port, path, callback) ->
app = createAndConfigureApp()
http.createServer(app).listen(app.get('port'))
log.info('Express SSL server listening on port ' + app.get('port'))
app
port = port or app.get('port')
http.createServer(app).listen(port, callback)
log.info('Express SSL server listening on port ' + port)
http
createAndConfigureApp = ->
serverSetup.setupLogging()