diff --git a/lib/before-build-task-args.ts b/lib/before-build-task-args.ts new file mode 100644 index 0000000..bcdb893 --- /dev/null +++ b/lib/before-build-task-args.ts @@ -0,0 +1,8 @@ + +module.exports = function (hookArgs, $options) { + if(!hookArgs || !hookArgs.args) { + return; + } + const unitTesting = $options && $options.env && $options.env.unitTesting || false; + hookArgs.args.push(`-PunitTesting=${!!unitTesting}`); +}; diff --git a/package.json b/package.json index 49cd84c..5f433ea 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,11 @@ "type": "before-liveSync", "script": "lib/before-liveSync.js", "inject": true + }, + { + "type": "before-build-task-args", + "script": "lib/before-build-task-args.js", + "inject": true } ] },