Permalink
Browse files

removing the needs of a special file for holding up toaster version i…

…n favor of package.json
  • Loading branch information...
arboleya committed Apr 10, 2012
1 parent 4562753 commit 9d0b97b6406ae44e226090382474fbece5772fb1
Showing with 20 additions and 16 deletions.
  1. +0 −1 build/VERSION
  2. +16 −13 lib/toaster.js
  3. +4 −2 src/toaster.coffee
View
@@ -1 +0,0 @@
-0.5.0
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -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

0 comments on commit 9d0b97b

Please sign in to comment.