Permalink
Browse files

Merge pull request #1 from Zearin/master

Update `path.existsSync` to `fs.existsSync`
  • Loading branch information...
2 parents fa1078a + 86eede6 commit f567903fe52953ac576667e64af5a85be6597a98 @contra contra committed Aug 30, 2012
Showing with 8 additions and 8 deletions.
  1. +6 −6 lib/logger.coffee
  2. +2 −2 lib/package.coffee
View
@@ -3,10 +3,10 @@ require 'colors'
pack = require('./package').load()
module.exports =
- log: (str...) -> console.log '[' + pack.name.magenta + ']', str...
- debug: (str...) -> console.log '[' + pack.name.magenta, '-', 'debug'.green + ']', str...
- info: (str...) -> console.log '[' + pack.name.magenta, '-', 'info'.white + ']', str...
- warn: (str...) -> console.log '[' + pack.name.magenta, '-', 'warn'.yellow + ']', str...
- error: (str...) -> console.log '[' + pack.name.magenta, '-', 'error'.red + ']', str...
- setName: (str) -> pack.name = str
+ log: (str...) -> console.log '[' + pack.name.magenta + ']', str...
+ debug: (str...) -> console.log '[' + pack.name.magenta, '-', 'debug'.green + ']', str...
+ info: (str...) -> console.log '[' + pack.name.magenta, '-', 'info'.white + ']', str...
+ warn: (str...) -> console.log '[' + pack.name.magenta, '-', 'warn'.yellow + ']', str...
+ error: (str...) -> console.log '[' + pack.name.magenta, '-', 'error'.red + ']', str...
+ setName: (str) -> pack.name = str
View
@@ -1,11 +1,11 @@
-fs = require 'fs'
+fs = require 'fs'
path = require 'path'
# Singleton for the contents of package.json
exports.load = ->
places = [path.join(process.cwd(), 'package.json'), path.join(__dirname, '../../', 'package.json')]
if !@package
- @package = JSON.parse(fs.readFileSync(place)) for place in places when !@package and path.existsSync(place)
+ @package = JSON.parse(fs.readFileSync(place)) for place in places when !@package and fs.existsSync(place)
if !@package
appName = path.basename(require.main.filename).replace(path.extname(require.main.filename), '')
@package = {name: appName}

0 comments on commit f567903

Please sign in to comment.