Permalink
Browse files

Add npm start/stop scripts

  • Loading branch information...
1 parent 609847d commit 1b35e54b85d0cce5e6cb52a14e9bc76a2971cb02 @josh josh committed Apr 7, 2011
Showing with 15 additions and 0 deletions.
  1. +13 −0 Cakefile
  2. +2 −0 package.json
View
@@ -84,3 +84,16 @@ task 'install', 'Install pow configuration files', ->
async.parallel [installLocal, installSystem], (err) ->
throw err if err
console.error "*** Installed"
+
+task 'start', 'Start pow server', ->
+ agent = "#{process.env['HOME']}/Library/LaunchAgents/cx.pow.powd.plist"
+ exec "launchctl unload '#{agent}'", ->
+ console.error "*** Starting the Pow server..."
+ exec "launchctl load '#{agent}'", (err, stdout, stderr) ->
+ console.error stderr if err
+
+task 'stop', 'Stop pow server', ->
+ agent = "#{process.env['HOME']}/Library/LaunchAgents/cx.pow.powd.plist"
+ console.error "*** Stopping the Pow server..."
+ exec "launchctl unload '#{agent}'", (err, stdout, stderr) ->
+ console.error stderr if err
View
@@ -25,5 +25,7 @@
, "scripts": {
"install": "node node_modules/coffee-script/bin/cake install"
, "test": "node node_modules/coffee-script/bin/cake test"
+, "start": "node node_modules/coffee-script/bin/cake start"
+, "stop": "node node_modules/coffee-script/bin/cake stop"
}
}

0 comments on commit 1b35e54

Please sign in to comment.