Skip to content
Browse files

Adding in new args and help for them

  • Loading branch information...
1 parent 0a20857 commit 8d77337658e4d331a0651742d21b93eec4fc6c5d @davglass committed Sep 4, 2012
Showing with 17 additions and 2 deletions.
  1. +13 −2 lib/args.js
  2. +4 −0 lib/help.js
View
15 lib/args.js
@@ -2,6 +2,9 @@
var nopt = require('nopt'),
known = {
version: Boolean,
+ compressor: Boolean,
+ semi: Boolean,
+ coverage: Boolean,
ant: Boolean,
help: Boolean,
strict: Boolean,
@@ -12,9 +15,10 @@ var nopt = require('nopt'),
quiet: Boolean,
cache: Boolean,
jsstamp: Boolean,
+ list: Boolean,
config: require('path'),
'cache-file': require('path'),
- lint: [ 'defaults', 'strict', 'preferred' ]
+ lint: [ 'defaults', 'strict', 'preferred', false ]
},
shorts = {
"c": ["--config"],
@@ -33,8 +37,15 @@ var raw = function (args) {
var parse = function (args) {
var parsed = raw(args);
delete parsed.argv;
- parsed.lint = parsed.lint || 'preferred';
+ //default 'preferred'
+ if (parsed.lint !== false) {
+ parsed.lint = parsed.lint || 'preferred';
+ }
+ //Default true
parsed.jsstamp = (parsed.jsstamp === undefined || parsed.jsstamp) ? true : false;
+ parsed.coverage = (parsed.coverage === undefined || parsed.coverage) ? true : false;
+ //Default false
+ parsed.semi = (parsed.semi === undefined || parsed.semi === false) ? false : true;
parsed.cache = (parsed.cache === undefined || parsed.cache === false) ? false : true;
return parsed;
};
View
4 lib/help.js
@@ -19,16 +19,20 @@ if (args.help) {
console.log(' --strict add "use strict" to module wrapper');
console.log(' -c/--config [file] specify a config file name');
console.log(' --ant parse the ant files and create a build.json but do not build');
+ console.log(' --list List the builds and rollups from the build.json file');
console.log(' --walk Walk the current directory and shift all builds. (cd yui3/src && shifter --walk)');
console.log(' -m/--modules also supported here for filtering');
console.log(' --watch Watch the current module and rebuild on file change (if meta file, a loader build will launch)');
console.log(' --quiet to mute stdout from sub build');
console.log(' all other build options accepted here: (--strict, --lint, etc)');
console.log(' --jsstamp/--no-jsstamp Should it stamp the JS with the YUI.add wrapper, defaults to --stamp');
console.log('Experimental Options:');
+ console.log(' --semi Toggle on the strict semicolon checking in Uglify');
console.log(' --cache/--no-cache Cache the results of the build and bail if building for no reason, defaults to --no-cache');
console.log(' --cache-file <path> File to store build cache, defaults to $CWD/.shifter_meta');
console.log(' --fail Fail the build if lint fails');
+ console.log(' --compressor Use YUI Compressor instead of uglify');
+ console.log(' --no-lint Skip JSlint, you better know what you are doing!');
}
process.exit(0);

0 comments on commit 8d77337

Please sign in to comment.
Something went wrong with that request. Please try again.