@fulminate/cli
Advanced tools
Comparing version 2.3.6 to 2.3.7
{ | ||
"name": "@fulminate/cli", | ||
"version": "2.3.6", | ||
"version": "2.3.7", | ||
"description": "CLI for bootstrapping and simplifying control over Fulminate Framework projects.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,2 +6,3 @@ "use strict"; | ||
var command_resolver_1 = require("../util/command.resolver"); | ||
var fs_1 = require("fs"); | ||
var RunCommand = /** @class */ (function () { | ||
@@ -18,3 +19,15 @@ function RunCommand() { | ||
if (commandToRun) { | ||
shell.exec(commandToRun + " --colors always"); | ||
if (commandToRun.indexOf('@') === 0) { | ||
var extension = commandToRun === '@ts' ? 'ts' : 'js'; | ||
var pathToCommand = "./commands/" + commandToRun + ".command." + extension; | ||
if (fs_1.existsSync(pathToCommand)) { | ||
shell.exec((extension === 'ts' ? 'ts-node' : 'node') + " " + pathToCommand + " --colors always"); | ||
} | ||
else { | ||
src_1.Shell.w.error('Could not autowire the file. It should be ./commands/<COMMAND_NAME>.command.{ts|js}'); | ||
} | ||
} | ||
else { | ||
shell.exec(commandToRun + " --colors always"); | ||
} | ||
} | ||
@@ -21,0 +34,0 @@ else { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
28893
387
3