Add --indent option to change indent width
This commit is contained in:
parent
90437d262b
commit
0a207903ce
@ -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("-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("-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("-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("-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);
|
commander.option("-m, --module-ids", "Insert module id in modules", false);
|
||||||
|
|
||||||
@ -108,7 +109,12 @@ exports.opts = {
|
|||||||
optional: commander.optional,
|
optional: commander.optional,
|
||||||
comments: !commander.removeComments,
|
comments: !commander.removeComments,
|
||||||
runtime: commander.runtime,
|
runtime: commander.runtime,
|
||||||
modules: commander.modules
|
modules: commander.modules,
|
||||||
|
format: {
|
||||||
|
indent: {
|
||||||
|
style: util.repeat(parseInt(commander.indent))
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var fn;
|
var fn;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user