Comparing version 0.3.0 to 0.3.1
{ | ||
"name": "cli-task", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"repository": "https://github.com/astoilkov/cli-task", | ||
@@ -5,0 +5,0 @@ "description": "", |
#!/usr/bin/env node | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const Task_1 = require("./Task"); | ||
const path_1 = require("path"); | ||
@@ -19,6 +18,6 @@ const fs_1 = require("fs"); | ||
let task = require(taskPath.replace(/.js$/, '')); | ||
if (task && task.default && task.default instanceof Task_1.default) { | ||
if (task && isTask(task.default)) { | ||
task = task.default; | ||
} | ||
if (task instanceof Task_1.default) { | ||
if (isTask(task)) { | ||
task.exec({ | ||
@@ -34,2 +33,6 @@ print: argv.hasOwnProperty('print') ? argv.print : true, | ||
} | ||
function isTask(obj) { | ||
return obj && typeof obj.exec == 'function' && typeof obj.add == 'function' && | ||
typeof obj.withOptions == 'function' && Array.isArray(obj.steps); | ||
} | ||
//# sourceMappingURL=cli.js.map |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21225
614