Skip to content

Commit

Permalink
removing the needs of a special file for holding up toaster version i…
Browse files Browse the repository at this point in the history
…n favor of package.json
  • Loading branch information
arboleya committed Apr 10, 2012
1 parent 4562753 commit 9d0b97b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
1 change: 0 additions & 1 deletion build/VERSION

This file was deleted.

29 changes: 16 additions & 13 deletions lib/toaster.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/toaster.coffee
Expand Up @@ -24,8 +24,10 @@ class Toaster

# version
if @cli.argv.v
version_path = pn __dirname + "/../build/VERSION"
return log fs.readFileSync( version_path, "utf-8" ).replace /\n/, ""
filepath = pn __dirname + "/../package.json"
contents = fs.readFileSync( filepath, "utf-8" )
schema = JSON.parse( contents ).version
return log schema

# scaffolds basic structure for new projects
else if @cli.argv.n
Expand Down

0 comments on commit 9d0b97b

Please sign in to comment.