Merge pull request #416 from monsanto/indent

Add --indent option to change indent width
This commit is contained in:
Sebastian McKenzie 2015-01-08 12:43:41 +11:00
commit 98985dd253

View File

@ -21,6 +21,7 @@ commander.option("-i, --optional [list]", "List of optional transformers to enab
commander.option("-o, --out-file [out]", "Compile all input files into a single file");
commander.option("-d, --out-dir [out]", "Compile an input directory of modules into an output directory");
commander.option("-c, --remove-comments", "Remove comments from the compiled code", false);
commander.option("-I, --indent [width]", "Indent width [2]", 2);
commander.option("-a, --amd-module-ids", "Insert module id in AMD modules", false); // todo: remove in 3.0.0
commander.option("-m, --module-ids", "Insert module id in modules", false);
@ -108,7 +109,12 @@ exports.opts = {
optional: commander.optional,
comments: !commander.removeComments,
runtime: commander.runtime,
modules: commander.modules
modules: commander.modules,
format: {
indent: {
style: util.repeat(parseInt(commander.indent))
}
}
};
var fn;