brickyard3
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -0,1 +1,2 @@ | ||
/* eslint no-underscore-dangle:0 */ | ||
/** | ||
@@ -53,3 +54,3 @@ * Created by scott on 16-3-29. | ||
_.forOwn(commandsConfig, function (cmdConfig, name) { | ||
const cmd = require(cmdConfig.path) | ||
const cmdModule = require(cmdConfig.path) | ||
const cmdName = name.split('-')[2] | ||
@@ -60,3 +61,3 @@ | ||
} | ||
cmd.register(rootcmd.command(cmdName), commandRunner) | ||
const cmd = cmdModule.register(rootcmd.command(cmdName), commandRunner) | ||
@@ -66,4 +67,9 @@ if (cli.commands[cmdName]) { | ||
} | ||
cli.commands[cmdName] = cmd | ||
cli.commands[cmdName] = cmdModule | ||
if (cmd && cmd._alias) { | ||
cli.commands[cmd._alias] = cmdModule | ||
} | ||
}) | ||
} |
{ | ||
"name": "brickyard3", | ||
"author": "e-cloud", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "plugin framework for building extendable and flexible web apps or back-end services.", | ||
@@ -36,3 +36,4 @@ "main": "index.js", | ||
"test": "mocha test", | ||
"test-cov": "istanbul cover mocha -- -i -f 'staller' --reporter dot --check-leaks test" | ||
"test-cov": "istanbul cover mocha -- -i -f 'staller' --reporter dot --check-leaks test", | ||
"postversion": "git push && git push --tags && npm publish . --registry=https://registry.npmjs.org/" | ||
}, | ||
@@ -39,0 +40,0 @@ "license": "ISC", |
22343
635