.helpOption('-?, -h, --help', 'Display this help message')
.option('-f, --force', 'Force compilation to continue on error')
.option('-a, --filters <filters>', 'Give the compiler a comma-delimited list of asynchronous filters, required for correctly generating code')
.option('-n, --name <name>', 'Specify the template name when compiling a single file')
.option('-i, --include <regex>', 'Include a file or folder which match the regex but would otherwise be excluded. You can use this flag multiple times', concat, ['\\.html$', '\\.jinja$'])
.option('-x, --exclude <regex>', 'Exclude a file or folder which match the regex but would otherwise be included. You can use this flag multiple times', concat, [])
.option('-w, --wrapper <wrapper>', 'Load a external plugin to change the output format of the precompiled templates (for example, "-w custom" will load a module named "nunjucks-custom")')
.action(function (path) {
cmdpath = path;
})
.parse(process.argv);
function concat(value, previous) {
return previous.concat(value);
}
if (cmdpath == null) {
program.outputHelp();
console.error('\nerror: no path given');
process.exit(1);
}
var env = new Environment([]);
const opts = program.opts();
lib.each([].concat(opts.filters).join(',').split(','), function (name) {