Skip to content

Commit

Permalink
Add
Browse files Browse the repository at this point in the history
  • Loading branch information
akaspin committed Jul 9, 2012
1 parent b81db7d commit 290e4c0
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions bin/hulk
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,22 @@ var hogan = require('../lib/hogan.js')
// locals
var specials = ['/', '.', '*', '+', '?', '|','(', ')', '[', ']', '{', '}', '\\']
, specialsRegExp = new RegExp('(\\' + specials.join('|\\') + ')', 'g')
, options = { 'wrapper' : String, 'outputdir': path, 'help': true, 'version': true }
, shortHand = { 'w': ['--wrapper'], 'o': ['--outputdir'], 'h': ['--help'], 'v': ['--version'] }
, options = {
'namespace': String,
'outputdir': path,
'variable': String,
'wrapper': String,
'version': true,
'help': true
}
, shortHand = {
'n': ['--namespace'],
'o': ['--outputdir'],
'v': ['--variable'],
'w': ['--wrapper'],
'h': ['--help'],
'v': ['--version']
}
, templates;

// options
Expand All @@ -48,9 +62,11 @@ function cyan(text) {
// check for dirs and correct ext (<3 for windows)
function extractFiles(args) {
var usage = '\n' +
cyan('USAGE:') + ' hulk [--wrapper wrapper] [--outputdir outputdir] FILES\n\n' +
cyan('USAGE:') + ' hulk [--wrapper wrapper] [--outputdir outputdir] [--namespace namespace] [--variable variable] FILES\n\n' +
cyan('OPTIONS:') + ' [-w, --wrapper] :: wraps the template (i.e. amd)\n' +
' [-o, --outputdir] :: outputs the templates as individual files to a directory\n\n' +
' [-n, --namespace] :: prepend string to template names\n\n' +
' [-v, --variable] :: variable name for non-amd wrapper\n\n' +
cyan('EXAMPLE:') + ' hulk --wrapper amd ./templates/*.mustache\n\n' +
cyan('NOTE:') + ' hulk supports the "*" wildcard and allows you to target specific extensions too\n',
files = [];
Expand Down

1 comment on commit 290e4c0

@atk
Copy link

@atk atk commented on 290e4c0 Jul 20, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shorthands for --variable and --version are identical; see issue #210

Please sign in to comment.