Added a --force option

This commit is contained in:
Patrick Steele-Idem 2015-03-04 15:14:01 -07:00
parent 72b8b649ff
commit 76929b7dd2

View File

@ -56,6 +56,10 @@ var args = require('raptor-args').createParser({
type: 'boolean',
description: 'Clean all of the *.marko.js files'
},
'--force': {
type: 'boolean',
description: 'Force template recompilation even if unchanged'
},
'--paths -p': {
type: 'string[]',
description: 'Additional directories to add to the Node.js module search path'
@ -90,6 +94,11 @@ var args = require('raptor-args').createParser({
.parse();
var force = args.force;
if (force) {
markoCompiler.defaultOptions.checkUpToDate = false;
}
var paths = args.paths;
if (paths && paths.length) {
paths.forEach(function(path) {