now has --notest option

This commit is contained in:
2016-06-16 03:02:33 +02:00
parent 12199a668e
commit 1f50f54fe9
9 changed files with 42 additions and 23 deletions

6
dist/index.js vendored
View File

@ -9,15 +9,15 @@ var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths");
var npmts_promisechain_1 = require("./npmts.promisechain");
early.stop()
.done(function () {
.then(function () {
var npmtsProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.npmtsPackageRoot);
var npmtsCli = new plugins.smartcli.Smartcli();
npmtsCli.standardTask()
.then(function () {
.then(function (argvArg) {
plugins.beautylog.figletSync("NPMTS");
plugins.beautylog.info("npmts version: " + npmtsProjectInfo.version);
try {
npmts_promisechain_1.promisechain();
npmts_promisechain_1.promisechain(argvArg);
}
catch (err) {
console.log(err);

View File

@ -2,10 +2,13 @@
require("typings-global");
var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths");
exports.run = function () {
exports.run = function (argvArg) {
var done = plugins.Q.defer();
var config = {};
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);

View File

@ -11,10 +11,10 @@ var NpmtsJsdoc = require("./npmts.jsdoc");
var NpmtsOptions = require("./npmts.options");
var NpmtsPublish = require("./npmts.publish");
var NpmtsTests = require("./npmts.tests");
exports.promisechain = function () {
exports.promisechain = function (argvArg) {
var done = plugins.Q.defer();
exports.npmtsOra.start();
NpmtsConfigFile.run()
NpmtsConfigFile.run(argvArg)
.then(NpmtsOptions.run)
.then(NpmtsClean.run)
.then(NpmtsInstall.run)

23
dist/npmts.tests.js vendored
View File

@ -56,13 +56,20 @@ var coverage = function (configArg) {
exports.run = function (configArg) {
var done = plugins.Q.defer();
var config = configArg;
npmts_promisechain_1.npmtsOra.text("now starting tests");
plugins.beautylog.log("-------------------------------------------------------\n" +
"*************************** TESTS: ***************************\n" +
"--------------------------------------------------------------");
istanbul(config)
.then(mocha)
.then(coverage)
.then(done.resolve);
if (!config.notest) {
npmts_promisechain_1.npmtsOra.text("now starting tests");
plugins.beautylog.log("-------------------------------------------------------\n" +
"*************************** TESTS: ***************************\n" +
"--------------------------------------------------------------");
istanbul(config)
.then(mocha)
.then(coverage)
.then(function () {
done.resolve(config);
});
}
else {
done.resolve(config);
}
return done.promise;
};