Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a version command.

  • Loading branch information...
commit 6f70aa57df79cf13df210b0369dca3d05015e406 1 parent af209f2
@jarod2d authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 bin/squire
View
10 bin/squire
@@ -29,6 +29,12 @@ getTemplateList = ->
templates.join ", "
+# A helper function that will return the current version.
+getVersion = ->
+ file = lib.fs.readFileSync("package.json").toString()
+ "v" + JSON.parse(file).version
+
+
# Configure nomnom and set up our commands.
lib.nomnom.script("squire").colors()
@@ -66,5 +72,9 @@ lib.nomnom.command("build").
).
callback (options) -> commands.build.run options
+lib.nomnom.command("version").
+ help("Print the current version.").
+ callback (options) -> console.log getVersion()
+
# Parse the arguments.
args = lib.nomnom.parse()
Please sign in to comment.
Something went wrong with that request. Please try again.