Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix error msg.

  • Loading branch information...
commit 28688620dfa8b3c44385db787aa23c4580ca00e9 1 parent b30e5dc
Esa-Matti Suuronen authored
13 index.coffee
View
@@ -2,7 +2,7 @@
path = require "path"
fs = require "fs"
-cli = require('cli').enable("version")
+cli = require 'cli'
watcher = require __dirname + "/lib/watcher"
@@ -13,8 +13,15 @@ cli.parse
showVersion = ->
- data = JSON.parse fs.readFileSync(__dirname + "/package.json").toString()
- console.log "Current version is #{ data.version }"
+ package = JSON.parse fs.readFileSync(__dirname + "/package.json").toString()
+ console.log """
+ Projectwatch v#{ package.version }
+
+ #{ package.description }
+
+ Homepage: #{ package.homepage }
+ Bugs: #{ package.bugs.web }
+ """
exports.run = ->
cli.main (dirs, options) ->
9 lib/watcher.coffee
View
@@ -102,12 +102,11 @@ class Watcher extends EventEmitter
if @exitstatus isnt 0
@emitStatus "error"
- console.log "Error in '#{ @name }'
- details http://localhost:#{ port }/##{ @id }"
+ console.log "Error in #{ @name }"
else
- console.log "\nRan", @name, "successfully!\n", (new Date) + 2*60*60
- @exitstatus = 0
@emitStatus "success"
+ console.log "Ran", @name, "successfully! ", (new Date) + 2*60*60
+ @exitstatus = 0
@@ -151,5 +150,5 @@ exports.searchAndWatch = (dirs, options) ->
webserver.registerWatcher watcher
- webserver.start(options.port)
+ webserver.start(options.port, options.host)
6 lib/web/server.coffee
View
@@ -67,7 +67,7 @@ exports.registerWatcher = (watcher) ->
everyone.now[watcher.id]?.sendStatus status
-exports.start = (port=8080) ->
- app.listen port
- console.log "Listening on http://localhost:#{ port }/"
+exports.start = (port, host) ->
+ app.listen port, host
+ console.log "Listening on http://#{ host }:#{ port }/"
4 package.json
View
@@ -3,6 +3,10 @@
, "version": "0.3.0"
, "author": "Esa-Matti Suuronen"
, "homepage": "https://github.com/epeli/Projectwatch"
+ , "description": "Automatic test and preprocessor runner."
+ , "bugs": {
+ "web": "https://github.com/epeli/Projectwatch/issues/"
+ }
, "repository":
{ "type": "git"
, "url": "git://github.com/epeli/Projectwatch.git"
Please sign in to comment.
Something went wrong with that request. Please try again.