now handling cli option

This commit is contained in:
2016-03-14 04:32:52 +01:00
parent 55d7018891
commit 3ce49c7e97
13 changed files with 68 additions and 20 deletions

16
dist/npmts.assets.js vendored Normal file
View File

@ -0,0 +1,16 @@
"use strict";
/// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths");
exports.run = function (configArg) {
var done = plugins.Q.defer();
var config = configArg;
if (config.cli == true) {
plugins.smartfile.copy(plugins.path.join(paths.npmtsAssetsDir, "cli.js"), paths.distDir);
done.resolve(config);
}
else {
done.resolve(config);
}
return done.promise;
};

View File

@ -1,5 +1,5 @@
"use strict";
/// <reference path="./typings/main.d.ts" />
/// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths");
exports.run = function (configArg) {

4
dist/npmts.jsdoc.js vendored
View File

@ -37,11 +37,11 @@ var publishDocs = function (configArg) {
if (plugins.smartenv.getEnv().isTravis && configArg.docs && configArg.docs.publish) {
plugins.beautylog.log("now publishing docs to GitHub");
if (!plugins.shelljs.which('git')) {
plugins.beautylog.error('Git is not installed');
plugins.beautylog.error('Git is not installed!');
plugins.shelljs.exit(1);
}
else if (plugins.shelljs.exec(deployScript).code !== 0) {
plugins.beautylog.error('Error: Git failed');
plugins.beautylog.error('Git failed!');
plugins.shelljs.exit(1);
}
plugins.beautylog.ok("JsDoc has been deployed to GitHub!");

1
dist/npmts.paths.js vendored
View File

@ -8,6 +8,7 @@ paths.tsDir = plugins.path.join(paths.cwd, "ts/");
paths.distDir = plugins.path.join(paths.cwd, "dist/");
paths.docsDir = plugins.path.join(paths.cwd, "docs/");
paths.testDir = plugins.path.join(paths.cwd, "test/");
paths.npmtsAssetsDir = plugins.path.join(__dirname, "../assets/");
//Files
paths.indexTS = plugins.path.join(paths.cwd, "ts/index.ts");
paths.testTS = plugins.path.join(paths.cwd, "ts/test.ts");

View File

@ -1,11 +1,12 @@
"use strict";
/// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins");
var NpmtsConfigFile = require("./npmts.configfile");
var NpmtsOptions = require("./npmts.options");
var NpmtsInstall = require("./npmts.install");
var NpmtsAssets = require("./npmts.assets");
var NpmtsCompile = require("./npmts.compile");
var NpmtsConfigFile = require("./npmts.configfile");
var NpmtsInstall = require("./npmts.install");
var NpmtsJsdoc = require("./npmts.jsdoc");
var NpmtsOptions = require("./npmts.options");
var NpmtsTests = require("./npmts.tests");
exports.run = function () {
var promisechain;
@ -13,6 +14,7 @@ exports.run = function () {
.then(NpmtsOptions.run)
.then(NpmtsInstall.run)
.then(NpmtsCompile.run)
.then(NpmtsAssets.run)
.then(NpmtsJsdoc.run)
.then(NpmtsTests.run)
.then(function (configArg) {
@ -30,8 +32,10 @@ exports.run = function () {
" wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\n" +
" wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\n" +
" wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\n";
console.log(shipString);
plugins.beautylog.success("READY TO SHIP!");
if (process.env.CI) {
console.log(shipString);
plugins.beautylog.success("READY TO SHIP!");
}
});
return promisechain;
};