now has --notest option
This commit is contained in:
@ -9,16 +9,16 @@ import * as plugins from "./npmts.plugins"
|
||||
import * as paths from "./npmts.paths";
|
||||
import {promisechain} from "./npmts.promisechain";
|
||||
early.stop()
|
||||
.done(() => {
|
||||
.then(() => {
|
||||
let npmtsProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.npmtsPackageRoot);
|
||||
|
||||
let npmtsCli = new plugins.smartcli.Smartcli();
|
||||
npmtsCli.standardTask()
|
||||
.then(() => {
|
||||
.then((argvArg) => {
|
||||
plugins.beautylog.figletSync("NPMTS");
|
||||
plugins.beautylog.info("npmts version: " + npmtsProjectInfo.version);
|
||||
try {
|
||||
promisechain();
|
||||
promisechain(argvArg);
|
||||
}
|
||||
catch(err){
|
||||
console.log(err);
|
||||
|
@ -1,10 +1,13 @@
|
||||
import "typings-global";
|
||||
import plugins = require("./npmts.plugins");
|
||||
import paths = require("./npmts.paths");
|
||||
export var run = function(){
|
||||
export var run = function(argvArg){
|
||||
var done = plugins.Q.defer();
|
||||
var config:any = {};
|
||||
var configPath = plugins.path.join(paths.cwd,"npmts.json");
|
||||
if(argvArg.notest){
|
||||
config.notest = true;
|
||||
}
|
||||
if(plugins.smartfile.checks.fileExistsSync(configPath)){
|
||||
plugins.beautylog.info("npmts.json".blue + " config file found!");
|
||||
config = plugins.smartfile.local.toObjectSync(configPath);
|
||||
|
@ -13,10 +13,10 @@ import NpmtsOptions = require("./npmts.options");
|
||||
import NpmtsPublish = require("./npmts.publish");
|
||||
import NpmtsTests = require("./npmts.tests");
|
||||
|
||||
export let promisechain = function(){
|
||||
export let promisechain = function(argvArg){
|
||||
let done = plugins.Q.defer();
|
||||
npmtsOra.start();
|
||||
NpmtsConfigFile.run()
|
||||
NpmtsConfigFile.run(argvArg)
|
||||
.then(NpmtsOptions.run)
|
||||
.then(NpmtsClean.run)
|
||||
.then(NpmtsInstall.run)
|
||||
|
@ -62,6 +62,7 @@ let coverage = function(configArg){
|
||||
export let run = function(configArg) {
|
||||
let done = plugins.Q.defer();
|
||||
let config = configArg;
|
||||
if(!config.notest){
|
||||
|
||||
npmtsOra.text("now starting tests");
|
||||
plugins.beautylog.log(
|
||||
@ -73,6 +74,11 @@ export let run = function(configArg) {
|
||||
istanbul(config)
|
||||
.then(mocha)
|
||||
.then(coverage)
|
||||
.then(done.resolve);
|
||||
.then(() => {
|
||||
done.resolve(config);
|
||||
});
|
||||
} else {
|
||||
done.resolve(config);
|
||||
}
|
||||
return done.promise;
|
||||
};
|
Reference in New Issue
Block a user