Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
65fe421de1 | |||
d94d66ef19 | |||
3e4ac03a63 | |||
0948fa806c | |||
53980160df | |||
886f1ae6f4 | |||
4602e7e3c9 | |||
1dbb5f6f36 | |||
1023bf9f3c | |||
78bebcda25 | |||
74deee70a3 | |||
019864a484 | |||
80db0fc581 | |||
9a25b4ef91 | |||
9f42a20e4b | |||
dbb8fd0fff | |||
4368713ad5 | |||
58cea5cb48 |
4
dist/mod00/index.d.ts
vendored
4
dist/mod00/index.d.ts
vendored
@ -1,4 +1,2 @@
|
|||||||
/// <reference types="q" />
|
|
||||||
import * as q from 'q';
|
|
||||||
import { INpmtsConfig } from '../npmts.config';
|
import { INpmtsConfig } from '../npmts.config';
|
||||||
export declare let run: (configArg: INpmtsConfig) => q.Promise<INpmtsConfig>;
|
export declare let run: (configArg: INpmtsConfig) => Promise<INpmtsConfig>;
|
||||||
|
6
dist/mod00/index.js
vendored
6
dist/mod00/index.js
vendored
@ -2,15 +2,15 @@
|
|||||||
/* ------------------------------------------
|
/* ------------------------------------------
|
||||||
* This module compiles TypeScript files
|
* This module compiles TypeScript files
|
||||||
* -------------------------------------------- */
|
* -------------------------------------------- */
|
||||||
const q = require("q");
|
const q = require("smartq");
|
||||||
const npmts_log_1 = require("../npmts.log");
|
const plugins = require("./mod00.plugins");
|
||||||
const NpmtsAssets = require("./mod00.assets");
|
const NpmtsAssets = require("./mod00.assets");
|
||||||
const NpmtsCheck = require("./mod00.check");
|
const NpmtsCheck = require("./mod00.check");
|
||||||
const NpmtsClean = require("./mod00.clean");
|
const NpmtsClean = require("./mod00.clean");
|
||||||
const NpmtsCompile = require("./mod00.compile");
|
const NpmtsCompile = require("./mod00.compile");
|
||||||
exports.run = function (configArg) {
|
exports.run = function (configArg) {
|
||||||
let done = q.defer();
|
let done = q.defer();
|
||||||
npmts_log_1.npmtsOra.text('starting TypeScript Compilation');
|
plugins.beautylog.ora.text('starting TypeScript Compilation');
|
||||||
NpmtsClean.run(configArg)
|
NpmtsClean.run(configArg)
|
||||||
.then(NpmtsCheck.run)
|
.then(NpmtsCheck.run)
|
||||||
.then(NpmtsCompile.run)
|
.then(NpmtsCompile.run)
|
||||||
|
4
dist/mod00/mod00.assets.d.ts
vendored
4
dist/mod00/mod00.assets.d.ts
vendored
@ -1,3 +1 @@
|
|||||||
/// <reference types="q" />
|
export declare let run: (configArg: any) => Promise<{}>;
|
||||||
import * as q from 'q';
|
|
||||||
export declare var run: (configArg: any) => q.Promise<{}>;
|
|
||||||
|
5
dist/mod00/mod00.assets.js
vendored
5
dist/mod00/mod00.assets.js
vendored
@ -1,13 +1,12 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
const q = require("q");
|
const q = require("smartq");
|
||||||
const paths = require("../npmts.paths");
|
const paths = require("../npmts.paths");
|
||||||
const npmts_log_1 = require("../npmts.log");
|
|
||||||
const plugins = require("./mod00.plugins");
|
const plugins = require("./mod00.plugins");
|
||||||
const mod00_check_1 = require("../mod00/mod00.check");
|
const mod00_check_1 = require("../mod00/mod00.check");
|
||||||
exports.run = function (configArg) {
|
exports.run = function (configArg) {
|
||||||
let done = q.defer();
|
let done = q.defer();
|
||||||
let config = configArg;
|
let config = configArg;
|
||||||
npmts_log_1.npmtsOra.text('now looking at ' + 'required assets'.yellow);
|
plugins.beautylog.ora.text('now looking at ' + 'required assets'.yellow);
|
||||||
if (config.cli === true) {
|
if (config.cli === true) {
|
||||||
let mainJsPath = mod00_check_1.projectInfo.packageJson.main;
|
let mainJsPath = mod00_check_1.projectInfo.packageJson.main;
|
||||||
let cliJsString = plugins.smartfile.fs.toStringSync(plugins.path.join(paths.npmtsAssetsDir, 'cli.js'));
|
let cliJsString = plugins.smartfile.fs.toStringSync(plugins.path.join(paths.npmtsAssetsDir, 'cli.js'));
|
||||||
|
4
dist/mod00/mod00.check.d.ts
vendored
4
dist/mod00/mod00.check.d.ts
vendored
@ -1,5 +1,3 @@
|
|||||||
/// <reference types="q" />
|
|
||||||
import * as q from 'q';
|
|
||||||
import { ProjectinfoNpm } from 'projectinfo';
|
import { ProjectinfoNpm } from 'projectinfo';
|
||||||
export declare let projectInfo: ProjectinfoNpm;
|
export declare let projectInfo: ProjectinfoNpm;
|
||||||
export declare let run: (configArg: any) => q.Promise<{}>;
|
export declare let run: (configArg: any) => Promise<{}>;
|
||||||
|
13
dist/mod00/mod00.check.js
vendored
13
dist/mod00/mod00.check.js
vendored
@ -1,12 +1,11 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
const q = require("q");
|
const q = require("smartq");
|
||||||
const projectinfo_1 = require("projectinfo");
|
const projectinfo_1 = require("projectinfo");
|
||||||
const paths = require("../npmts.paths");
|
const paths = require("../npmts.paths");
|
||||||
const npmts_log_1 = require("../npmts.log");
|
|
||||||
const plugins = require("./mod00.plugins");
|
const plugins = require("./mod00.plugins");
|
||||||
let checkProjectTypings = (configArg) => {
|
let checkProjectTypings = (configArg) => {
|
||||||
let done = q.defer();
|
let done = q.defer();
|
||||||
npmts_log_1.npmtsOra.text('Check Module: Check Project Typings...');
|
plugins.beautylog.ora.text('Check Module: Check Project Typings...');
|
||||||
exports.projectInfo = new projectinfo_1.ProjectinfoNpm(paths.cwd);
|
exports.projectInfo = new projectinfo_1.ProjectinfoNpm(paths.cwd);
|
||||||
if (typeof exports.projectInfo.packageJson.typings === 'undefined') {
|
if (typeof exports.projectInfo.packageJson.typings === 'undefined') {
|
||||||
plugins.beautylog.error(`please add typings field to package.json`);
|
plugins.beautylog.error(`please add typings field to package.json`);
|
||||||
@ -32,7 +31,7 @@ const depcheckOptions = {
|
|||||||
};
|
};
|
||||||
let checkDependencies = (configArg) => {
|
let checkDependencies = (configArg) => {
|
||||||
let done = q.defer();
|
let done = q.defer();
|
||||||
npmts_log_1.npmtsOra.text('Check Module: Check Dependencies...');
|
plugins.beautylog.ora.text('Check Module: Check Dependencies...');
|
||||||
let depcheckOptionsMerged = plugins.lodash.merge(depcheckOptions, {
|
let depcheckOptionsMerged = plugins.lodash.merge(depcheckOptions, {
|
||||||
ignoreDirs: [
|
ignoreDirs: [
|
||||||
'test',
|
'test',
|
||||||
@ -68,7 +67,7 @@ let checkDependencies = (configArg) => {
|
|||||||
};
|
};
|
||||||
let checkDevDependencies = (configArg) => {
|
let checkDevDependencies = (configArg) => {
|
||||||
let done = q.defer();
|
let done = q.defer();
|
||||||
npmts_log_1.npmtsOra.text('Check Module: Check devDependencies...');
|
plugins.beautylog.ora.text('Check Module: Check devDependencies...');
|
||||||
let depcheckOptionsMerged = plugins.lodash.merge(depcheckOptions, {
|
let depcheckOptionsMerged = plugins.lodash.merge(depcheckOptions, {
|
||||||
ignoreDirs: [
|
ignoreDirs: [
|
||||||
'ts',
|
'ts',
|
||||||
@ -103,13 +102,13 @@ let checkDevDependencies = (configArg) => {
|
|||||||
};
|
};
|
||||||
let checkNodeVersion = (configArg) => {
|
let checkNodeVersion = (configArg) => {
|
||||||
let done = q.defer();
|
let done = q.defer();
|
||||||
npmts_log_1.npmtsOra.text('checking node version');
|
plugins.beautylog.ora.text('checking node version');
|
||||||
done.resolve(configArg);
|
done.resolve(configArg);
|
||||||
return done.promise;
|
return done.promise;
|
||||||
};
|
};
|
||||||
exports.run = (configArg) => {
|
exports.run = (configArg) => {
|
||||||
let done = q.defer();
|
let done = q.defer();
|
||||||
npmts_log_1.npmtsOra.text('Check Module: ...');
|
plugins.beautylog.ora.text('Check Module: ...');
|
||||||
checkProjectTypings(configArg)
|
checkProjectTypings(configArg)
|
||||||
.then(checkDependencies)
|
.then(checkDependencies)
|
||||||
.then(checkDevDependencies)
|
.then(checkDevDependencies)
|
||||||
|
4
dist/mod00/mod00.clean.d.ts
vendored
4
dist/mod00/mod00.clean.d.ts
vendored
@ -1,3 +1 @@
|
|||||||
/// <reference types="q" />
|
export declare let run: (configArg: any) => Promise<{}>;
|
||||||
import * as q from 'q';
|
|
||||||
export declare let run: (configArg: any) => q.Promise<{}>;
|
|
||||||
|
9
dist/mod00/mod00.clean.js
vendored
9
dist/mod00/mod00.clean.js
vendored
@ -1,13 +1,12 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
const q = require("q");
|
const q = require("smartq");
|
||||||
const paths = require("../npmts.paths");
|
const paths = require("../npmts.paths");
|
||||||
const npmts_log_1 = require("../npmts.log");
|
|
||||||
const plugins = require("./mod00.plugins");
|
const plugins = require("./mod00.plugins");
|
||||||
/**
|
/**
|
||||||
* removes the dist directory which will be entirely rebuild
|
* removes the dist directory which will be entirely rebuild
|
||||||
*/
|
*/
|
||||||
let removeDist = function () {
|
let removeDist = function () {
|
||||||
npmts_log_1.npmtsOra.text('cleaning dist folder');
|
plugins.beautylog.ora.text('cleaning dist folder');
|
||||||
return plugins.smartfile.fs.remove(paths.distDir);
|
return plugins.smartfile.fs.remove(paths.distDir);
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -25,11 +24,11 @@ let removeTestDeclarations = function () {
|
|||||||
* remove old pages
|
* remove old pages
|
||||||
*/
|
*/
|
||||||
let removePages = function () {
|
let removePages = function () {
|
||||||
npmts_log_1.npmtsOra.text('cleaning pages folder');
|
plugins.beautylog.ora.text('cleaning pages folder');
|
||||||
return plugins.smartfile.fs.remove(paths.pagesDir);
|
return plugins.smartfile.fs.remove(paths.pagesDir);
|
||||||
};
|
};
|
||||||
exports.run = function (configArg) {
|
exports.run = function (configArg) {
|
||||||
npmts_log_1.npmtsOra.text('cleaning up from previous builds...');
|
plugins.beautylog.ora.text('cleaning up from previous builds...');
|
||||||
let done = q.defer();
|
let done = q.defer();
|
||||||
removeDist()
|
removeDist()
|
||||||
.then(removeTestDeclarations)
|
.then(removeTestDeclarations)
|
||||||
|
4
dist/mod00/mod00.compile.d.ts
vendored
4
dist/mod00/mod00.compile.d.ts
vendored
@ -1,3 +1 @@
|
|||||||
/// <reference types="q" />
|
export declare let run: (configArg: any) => Promise<{}>;
|
||||||
import * as q from 'q';
|
|
||||||
export declare let run: (configArg: any) => q.Promise<{}>;
|
|
||||||
|
5
dist/mod00/mod00.compile.js
vendored
5
dist/mod00/mod00.compile.js
vendored
@ -1,12 +1,11 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
const q = require("q");
|
const q = require("smartq");
|
||||||
const paths = require("../npmts.paths");
|
const paths = require("../npmts.paths");
|
||||||
const npmts_log_1 = require("../npmts.log");
|
|
||||||
const plugins = require("./mod00.plugins");
|
const plugins = require("./mod00.plugins");
|
||||||
exports.run = function (configArg) {
|
exports.run = function (configArg) {
|
||||||
let done = q.defer();
|
let done = q.defer();
|
||||||
let config = configArg;
|
let config = configArg;
|
||||||
npmts_log_1.npmtsOra.text('now compiling ' + 'TypeScript'.yellow);
|
plugins.beautylog.ora.text('now compiling ' + 'TypeScript'.yellow);
|
||||||
plugins.tsn.compileGlobStringObject(config.ts, config.tsOptions, paths.cwd)
|
plugins.tsn.compileGlobStringObject(config.ts, config.tsOptions, paths.cwd)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
plugins.beautylog.ok('compiled main TypeScript!');
|
plugins.beautylog.ok('compiled main TypeScript!');
|
||||||
|
3
dist/mod00/mod00.plugins.d.ts
vendored
3
dist/mod00/mod00.plugins.d.ts
vendored
@ -1,6 +1,5 @@
|
|||||||
export * from '../npmts.plugins';
|
export * from '../npmts.plugins';
|
||||||
import * as tsn from 'tsn';
|
import * as tsn from 'tsn';
|
||||||
import * as shelljs from 'shelljs';
|
|
||||||
import * as smartchok from 'smartchok';
|
import * as smartchok from 'smartchok';
|
||||||
import * as smartstream from 'smartstream';
|
import * as smartstream from 'smartstream';
|
||||||
export { tsn, shelljs, smartchok, smartstream };
|
export { tsn, smartchok, smartstream };
|
||||||
|
2
dist/mod00/mod00.plugins.js
vendored
2
dist/mod00/mod00.plugins.js
vendored
@ -5,8 +5,6 @@ function __export(m) {
|
|||||||
__export(require("../npmts.plugins"));
|
__export(require("../npmts.plugins"));
|
||||||
const tsn = require("tsn");
|
const tsn = require("tsn");
|
||||||
exports.tsn = tsn;
|
exports.tsn = tsn;
|
||||||
const shelljs = require("shelljs");
|
|
||||||
exports.shelljs = shelljs;
|
|
||||||
const smartchok = require("smartchok");
|
const smartchok = require("smartchok");
|
||||||
exports.smartchok = smartchok;
|
exports.smartchok = smartchok;
|
||||||
const smartstream = require("smartstream");
|
const smartstream = require("smartstream");
|
||||||
|
4
dist/mod01/index.d.ts
vendored
4
dist/mod01/index.d.ts
vendored
@ -1,4 +1,2 @@
|
|||||||
/// <reference types="q" />
|
|
||||||
import * as q from 'q';
|
|
||||||
import { INpmtsConfig } from '../npmts.config';
|
import { INpmtsConfig } from '../npmts.config';
|
||||||
export declare let run: (configArg: INpmtsConfig) => q.Promise<INpmtsConfig>;
|
export declare let run: (configArg: INpmtsConfig) => Promise<INpmtsConfig>;
|
||||||
|
2
dist/mod01/index.js
vendored
2
dist/mod01/index.js
vendored
@ -2,7 +2,7 @@
|
|||||||
/* ------------------------------------------
|
/* ------------------------------------------
|
||||||
* This module creates TypeScript documentation
|
* This module creates TypeScript documentation
|
||||||
* -------------------------------------------- */
|
* -------------------------------------------- */
|
||||||
const q = require("q");
|
const q = require("smartq");
|
||||||
exports.run = function (configArg) {
|
exports.run = function (configArg) {
|
||||||
let done = q.defer();
|
let done = q.defer();
|
||||||
done.resolve(configArg);
|
done.resolve(configArg);
|
||||||
|
4
dist/mod02/index.d.ts
vendored
4
dist/mod02/index.d.ts
vendored
@ -1,4 +1,2 @@
|
|||||||
/// <reference types="q" />
|
|
||||||
import * as q from 'q';
|
|
||||||
import { INpmtsConfig } from '../npmts.config';
|
import { INpmtsConfig } from '../npmts.config';
|
||||||
export declare let run: (configArg: INpmtsConfig) => q.Promise<INpmtsConfig>;
|
export declare let run: (configArg: INpmtsConfig) => Promise<INpmtsConfig>;
|
||||||
|
17
dist/mod02/index.js
vendored
17
dist/mod02/index.js
vendored
@ -12,15 +12,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
* -------------------------------------------- */
|
* -------------------------------------------- */
|
||||||
const plugins = require("./mod02.plugins");
|
const plugins = require("./mod02.plugins");
|
||||||
const paths = require("../npmts.paths");
|
const paths = require("../npmts.paths");
|
||||||
const q = require("q");
|
const q = require("smartq");
|
||||||
const npmts_log_1 = require("../npmts.log");
|
|
||||||
/**
|
/**
|
||||||
* runs mocha
|
* runs mocha
|
||||||
* @returns INpmtsConfig
|
* @returns INpmtsConfig
|
||||||
*/
|
*/
|
||||||
let mocha = function (configArg) {
|
let mocha = function (configArg) {
|
||||||
npmts_log_1.npmtsOra.text('Instrumentalizing and testing transpiled JS');
|
plugins.beautylog.ora.text('Instrumentalizing and testing transpiled JS');
|
||||||
npmts_log_1.npmtsOra.end(); // end npmtsOra for tests.
|
plugins.beautylog.ora.end(); // end plugins.beautylog.ora for tests.
|
||||||
let done = q.defer();
|
let done = q.defer();
|
||||||
let coverageSmartstream = new plugins.smartstream.Smartstream([
|
let coverageSmartstream = new plugins.smartstream.Smartstream([
|
||||||
plugins.gulp.src([plugins.path.join(paths.cwd, './ts/**/*.ts')]),
|
plugins.gulp.src([plugins.path.join(paths.cwd, './ts/**/*.ts')]),
|
||||||
@ -29,13 +28,12 @@ let mocha = function (configArg) {
|
|||||||
target: 'ES5',
|
target: 'ES5',
|
||||||
emitDecoratorMetadata: true,
|
emitDecoratorMetadata: true,
|
||||||
experimentalDecorators: true,
|
experimentalDecorators: true,
|
||||||
lib: ['es2015.promise', 'es5']
|
lib: ['DOM', 'ES5', 'ES2015.Promise', 'ES2015.Generator', 'ES2015.Iterable']
|
||||||
}),
|
}),
|
||||||
plugins.gulpIstanbul({}),
|
plugins.gulpIstanbul({}),
|
||||||
plugins.gulpSourcemaps.write(),
|
plugins.gulpSourcemaps.write(),
|
||||||
plugins.gulpFunction.forEach((file) => __awaiter(this, void 0, void 0, function* () {
|
plugins.gulpFunction.forEach((file) => __awaiter(this, void 0, void 0, function* () {
|
||||||
file.path = file.path.replace(paths.tsDir, paths.distDir);
|
file.path = file.path.replace(paths.tsDir, paths.distDir);
|
||||||
console.log(file.path);
|
|
||||||
})),
|
})),
|
||||||
plugins.gulpInjectModules(),
|
plugins.gulpInjectModules(),
|
||||||
plugins.through2.obj((file, enc, cb) => {
|
plugins.through2.obj((file, enc, cb) => {
|
||||||
@ -49,7 +47,8 @@ let mocha = function (configArg) {
|
|||||||
plugins.gulpTypeScript({
|
plugins.gulpTypeScript({
|
||||||
target: 'ES5',
|
target: 'ES5',
|
||||||
emitDecoratorMetadata: true,
|
emitDecoratorMetadata: true,
|
||||||
experimentalDecorators: true
|
experimentalDecorators: true,
|
||||||
|
lib: ['DOM', 'ES5', 'ES2015.Promise', 'ES2015.Generator', 'ES2015.Iterable']
|
||||||
}),
|
}),
|
||||||
plugins.gulpInjectModules(),
|
plugins.gulpInjectModules(),
|
||||||
plugins.gulpMocha(),
|
plugins.gulpMocha(),
|
||||||
@ -103,7 +102,7 @@ exports.run = function (configArg) {
|
|||||||
let done = q.defer();
|
let done = q.defer();
|
||||||
let config = configArg;
|
let config = configArg;
|
||||||
if (config.test === true) {
|
if (config.test === true) {
|
||||||
npmts_log_1.npmtsOra.text('now starting tests');
|
plugins.beautylog.ora.text('now starting tests');
|
||||||
plugins.beautylog.log('------------------------------------------------------\n' +
|
plugins.beautylog.log('------------------------------------------------------\n' +
|
||||||
'*************************** TESTS: ***************************\n' +
|
'*************************** TESTS: ***************************\n' +
|
||||||
'--------------------------------------------------------------');
|
'--------------------------------------------------------------');
|
||||||
@ -114,7 +113,7 @@ exports.run = function (configArg) {
|
|||||||
}).catch(err => { console.log(err); });
|
}).catch(err => { console.log(err); });
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
npmts_log_1.npmtsOra.end();
|
plugins.beautylog.ora.end();
|
||||||
done.resolve(config);
|
done.resolve(config);
|
||||||
}
|
}
|
||||||
return done.promise;
|
return done.promise;
|
||||||
|
4
dist/npmts.cli.d.ts
vendored
4
dist/npmts.cli.d.ts
vendored
@ -1,3 +1 @@
|
|||||||
/// <reference types="q" />
|
export declare let run: () => Promise<{}>;
|
||||||
import * as q from 'q';
|
|
||||||
export declare let run: () => q.Promise<{}>;
|
|
||||||
|
5
dist/npmts.cli.js
vendored
5
dist/npmts.cli.js
vendored
@ -1,12 +1,11 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
const q = require("q");
|
const q = require("smartq");
|
||||||
const plugins = require("./npmts.plugins");
|
const plugins = require("./npmts.plugins");
|
||||||
const paths = require("./npmts.paths");
|
const paths = require("./npmts.paths");
|
||||||
const NpmtsConfig = require("./npmts.config");
|
const NpmtsConfig = require("./npmts.config");
|
||||||
const NpmtsMods = require("./npmts.mods");
|
const NpmtsMods = require("./npmts.mods");
|
||||||
const NpmtsWatch = require("./npmts.watch");
|
const NpmtsWatch = require("./npmts.watch");
|
||||||
const NpmtsShip = require("./npmts.ship");
|
const NpmtsShip = require("./npmts.ship");
|
||||||
const npmts_log_1 = require("./npmts.log");
|
|
||||||
exports.run = () => {
|
exports.run = () => {
|
||||||
let done = q.defer();
|
let done = q.defer();
|
||||||
let npmtsProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.npmtsPackageRoot);
|
let npmtsProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.npmtsPackageRoot);
|
||||||
@ -19,7 +18,7 @@ exports.run = () => {
|
|||||||
})
|
})
|
||||||
.then((configArg) => {
|
.then((configArg) => {
|
||||||
let done = q.defer();
|
let done = q.defer();
|
||||||
npmts_log_1.npmtsOra.start('loading additional modules...');
|
plugins.beautylog.ora.start('loading additional modules...');
|
||||||
NpmtsMods.mod00.load()
|
NpmtsMods.mod00.load()
|
||||||
.then((mod00) => {
|
.then((mod00) => {
|
||||||
return mod00.run(configArg);
|
return mod00.run(configArg);
|
||||||
|
4
dist/npmts.config.d.ts
vendored
4
dist/npmts.config.d.ts
vendored
@ -1,5 +1,3 @@
|
|||||||
/// <reference types="q" />
|
|
||||||
import * as q from 'q';
|
|
||||||
export declare type npmtsMode = 'default' | 'custom';
|
export declare type npmtsMode = 'default' | 'custom';
|
||||||
export interface INpmtsConfig {
|
export interface INpmtsConfig {
|
||||||
argv: any;
|
argv: any;
|
||||||
@ -11,4 +9,4 @@ export interface INpmtsConfig {
|
|||||||
tsOptions: any;
|
tsOptions: any;
|
||||||
watch: boolean;
|
watch: boolean;
|
||||||
}
|
}
|
||||||
export declare var run: (argvArg: any) => q.Promise<{}>;
|
export declare let run: (argvArg: any) => Promise<{}>;
|
||||||
|
5
dist/npmts.config.js
vendored
5
dist/npmts.config.js
vendored
@ -1,8 +1,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
const plugins = require("./npmts.plugins");
|
const plugins = require("./npmts.plugins");
|
||||||
const paths = require("./npmts.paths");
|
const paths = require("./npmts.paths");
|
||||||
const q = require("q");
|
const q = require("smartq");
|
||||||
const npmts_log_1 = require("./npmts.log");
|
|
||||||
;
|
;
|
||||||
exports.run = function (argvArg) {
|
exports.run = function (argvArg) {
|
||||||
let done = q.defer();
|
let done = q.defer();
|
||||||
@ -17,7 +16,7 @@ exports.run = function (argvArg) {
|
|||||||
watch: false
|
watch: false
|
||||||
};
|
};
|
||||||
// mix with configfile
|
// mix with configfile
|
||||||
npmts_log_1.npmtsOra.text('running npmextra');
|
plugins.beautylog.ora.text('running npmextra');
|
||||||
let localNpmextra = new plugins.npmextra.Npmextra(paths.cwd);
|
let localNpmextra = new plugins.npmextra.Npmextra(paths.cwd);
|
||||||
let config = localNpmextra.dataFor('npmts', defaultConfig);
|
let config = localNpmextra.dataFor('npmts', defaultConfig);
|
||||||
// add argv
|
// add argv
|
||||||
|
2
dist/npmts.log.d.ts
vendored
2
dist/npmts.log.d.ts
vendored
@ -1,2 +0,0 @@
|
|||||||
import { Ora } from 'beautylog';
|
|
||||||
export declare let npmtsOra: Ora;
|
|
3
dist/npmts.log.js
vendored
3
dist/npmts.log.js
vendored
@ -1,3 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
const beautylog_1 = require("beautylog");
|
|
||||||
exports.npmtsOra = new beautylog_1.Ora('setting up TaskChain', 'cyan');
|
|
2
dist/npmts.ship.js
vendored
2
dist/npmts.ship.js
vendored
@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
const q = require("q");
|
const q = require("smartq");
|
||||||
const plugins = require("./npmts.plugins");
|
const plugins = require("./npmts.plugins");
|
||||||
exports.run = (configArg) => {
|
exports.run = (configArg) => {
|
||||||
let done = q.defer();
|
let done = q.defer();
|
||||||
|
4
dist/npmts.watch.d.ts
vendored
4
dist/npmts.watch.d.ts
vendored
@ -1,4 +1,2 @@
|
|||||||
/// <reference types="q" />
|
|
||||||
import * as q from 'q';
|
|
||||||
import { INpmtsConfig } from './npmts.config';
|
import { INpmtsConfig } from './npmts.config';
|
||||||
export declare let run: (configArg: INpmtsConfig) => q.Promise<{}>;
|
export declare let run: (configArg: INpmtsConfig) => Promise<{}>;
|
||||||
|
2
dist/npmts.watch.js
vendored
2
dist/npmts.watch.js
vendored
@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
const q = require("q");
|
const q = require("smartq");
|
||||||
const smartchok = require("smartchok");
|
const smartchok = require("smartchok");
|
||||||
const plugins = require("./npmts.plugins");
|
const plugins = require("./npmts.plugins");
|
||||||
const cli = require("./npmts.cli");
|
const cli = require("./npmts.cli");
|
||||||
|
15
package.json
15
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "npmts",
|
"name": "npmts",
|
||||||
"version": "6.1.1",
|
"version": "6.1.9",
|
||||||
"description": "Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6.",
|
"description": "Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6.",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
@ -39,10 +39,8 @@
|
|||||||
"@types/gulp-mocha": "0.0.29",
|
"@types/gulp-mocha": "0.0.29",
|
||||||
"@types/gulp-sourcemaps": "0.0.29",
|
"@types/gulp-sourcemaps": "0.0.29",
|
||||||
"@types/minimatch": "^2.0.29",
|
"@types/minimatch": "^2.0.29",
|
||||||
"@types/q": "^0.x.x",
|
|
||||||
"@types/shelljs": "^0.3.33",
|
|
||||||
"@types/through2": "^2.0.32",
|
"@types/through2": "^2.0.32",
|
||||||
"beautylog": "6.0.0",
|
"beautylog": "6.1.0",
|
||||||
"depcheck": "^0.6.7",
|
"depcheck": "^0.6.7",
|
||||||
"early": "^2.0.35",
|
"early": "^2.0.35",
|
||||||
"gulp": "3.9.1",
|
"gulp": "3.9.1",
|
||||||
@ -55,20 +53,19 @@
|
|||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"npmextra": "^2.0.3",
|
"npmextra": "^2.0.3",
|
||||||
"projectinfo": "3.0.1",
|
"projectinfo": "3.0.1",
|
||||||
"q": "^1.4.1",
|
|
||||||
"shelljs": "^0.7.6",
|
|
||||||
"smartchok": "^1.0.4",
|
"smartchok": "^1.0.4",
|
||||||
"smartcli": "2.0.1",
|
"smartcli": "2.0.1",
|
||||||
"smartcov": "1.0.0",
|
"smartcov": "1.0.0",
|
||||||
"smartenv": "2.0.0",
|
"smartenv": "2.0.0",
|
||||||
"smartfile": "4.1.2",
|
"smartfile": "4.1.4",
|
||||||
"smartpath": "3.2.7",
|
"smartpath": "3.2.7",
|
||||||
|
"smartq": "^1.0.4",
|
||||||
"smartstream": "^1.0.5",
|
"smartstream": "^1.0.5",
|
||||||
"smartstring": "^2.0.22",
|
"smartstring": "^2.0.22",
|
||||||
"smartsystem": "^1.0.12",
|
"smartsystem": "^1.0.12",
|
||||||
"source-map-support": "^0.4.8",
|
"source-map-support": "^0.4.10",
|
||||||
"through2": "^2.0.3",
|
"through2": "^2.0.3",
|
||||||
"tsn": "^2.0.14",
|
"tsn": "^2.0.15",
|
||||||
"typescript": "next",
|
"typescript": "next",
|
||||||
"typings-global": "^1.0.14"
|
"typings-global": "^1.0.14"
|
||||||
},
|
},
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
/* ------------------------------------------
|
/* ------------------------------------------
|
||||||
* This module compiles TypeScript files
|
* This module compiles TypeScript files
|
||||||
* -------------------------------------------- */
|
* -------------------------------------------- */
|
||||||
import * as q from 'q'
|
import * as q from 'smartq'
|
||||||
|
|
||||||
import { npmtsOra } from '../npmts.log'
|
|
||||||
import { INpmtsConfig } from '../npmts.config'
|
import { INpmtsConfig } from '../npmts.config'
|
||||||
|
|
||||||
import * as plugins from './mod00.plugins'
|
import * as plugins from './mod00.plugins'
|
||||||
@ -13,9 +12,9 @@ import * as NpmtsCheck from './mod00.check'
|
|||||||
import * as NpmtsClean from './mod00.clean'
|
import * as NpmtsClean from './mod00.clean'
|
||||||
import * as NpmtsCompile from './mod00.compile'
|
import * as NpmtsCompile from './mod00.compile'
|
||||||
|
|
||||||
export let run = function(configArg: INpmtsConfig): q.Promise<INpmtsConfig> {
|
export let run = function(configArg: INpmtsConfig): Promise<INpmtsConfig> {
|
||||||
let done = q.defer<INpmtsConfig>()
|
let done = q.defer<INpmtsConfig>()
|
||||||
npmtsOra.text('starting TypeScript Compilation')
|
plugins.beautylog.ora.text('starting TypeScript Compilation')
|
||||||
NpmtsClean.run(configArg)
|
NpmtsClean.run(configArg)
|
||||||
.then(NpmtsCheck.run)
|
.then(NpmtsCheck.run)
|
||||||
.then(NpmtsCompile.run)
|
.then(NpmtsCompile.run)
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
import * as q from 'q'
|
import * as q from 'smartq'
|
||||||
|
|
||||||
import paths = require('../npmts.paths')
|
import paths = require('../npmts.paths')
|
||||||
import { npmtsOra } from '../npmts.log'
|
|
||||||
|
|
||||||
import plugins = require('./mod00.plugins')
|
import plugins = require('./mod00.plugins')
|
||||||
import { projectInfo } from '../mod00/mod00.check'
|
import { projectInfo } from '../mod00/mod00.check'
|
||||||
|
|
||||||
export var run = function(configArg){
|
export let run = function(configArg){
|
||||||
let done = q.defer()
|
let done = q.defer()
|
||||||
let config = configArg
|
let config = configArg
|
||||||
npmtsOra.text('now looking at ' + 'required assets'.yellow)
|
plugins.beautylog.ora.text('now looking at ' + 'required assets'.yellow)
|
||||||
if (config.cli === true) {
|
if (config.cli === true) {
|
||||||
let mainJsPath = projectInfo.packageJson.main
|
let mainJsPath = projectInfo.packageJson.main
|
||||||
let cliJsString: string = plugins.smartfile.fs.toStringSync(plugins.path.join(paths.npmtsAssetsDir,'cli.js'))
|
let cliJsString: string = plugins.smartfile.fs.toStringSync(plugins.path.join(paths.npmtsAssetsDir,'cli.js'))
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import * as q from 'q'
|
import * as q from 'smartq'
|
||||||
import { ProjectinfoNpm } from 'projectinfo'
|
import { ProjectinfoNpm } from 'projectinfo'
|
||||||
|
|
||||||
import * as paths from '../npmts.paths'
|
import * as paths from '../npmts.paths'
|
||||||
import { npmtsOra } from '../npmts.log'
|
|
||||||
|
|
||||||
import * as plugins from './mod00.plugins'
|
import * as plugins from './mod00.plugins'
|
||||||
|
|
||||||
@ -10,8 +9,8 @@ export let projectInfo: ProjectinfoNpm
|
|||||||
|
|
||||||
let checkProjectTypings = (configArg) => {
|
let checkProjectTypings = (configArg) => {
|
||||||
let done = q.defer()
|
let done = q.defer()
|
||||||
npmtsOra.text('Check Module: Check Project Typings...')
|
plugins.beautylog.ora.text('Check Module: Check Project Typings...')
|
||||||
projectInfo = new ProjectinfoNpm(paths.cwd)
|
projectInfo = new ProjectinfoNpm(paths.cwd)
|
||||||
if (typeof projectInfo.packageJson.typings === 'undefined') {
|
if (typeof projectInfo.packageJson.typings === 'undefined') {
|
||||||
plugins.beautylog.error(`please add typings field to package.json`)
|
plugins.beautylog.error(`please add typings field to package.json`)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
@ -37,7 +36,7 @@ const depcheckOptions = {
|
|||||||
|
|
||||||
let checkDependencies = (configArg) => {
|
let checkDependencies = (configArg) => {
|
||||||
let done = q.defer()
|
let done = q.defer()
|
||||||
npmtsOra.text('Check Module: Check Dependencies...')
|
plugins.beautylog.ora.text('Check Module: Check Dependencies...')
|
||||||
let depcheckOptionsMerged = plugins.lodash.merge(depcheckOptions, {
|
let depcheckOptionsMerged = plugins.lodash.merge(depcheckOptions, {
|
||||||
ignoreDirs: [ // folder with these names will be ignored
|
ignoreDirs: [ // folder with these names will be ignored
|
||||||
'test',
|
'test',
|
||||||
@ -73,7 +72,7 @@ let checkDependencies = (configArg) => {
|
|||||||
|
|
||||||
let checkDevDependencies = (configArg) => {
|
let checkDevDependencies = (configArg) => {
|
||||||
let done = q.defer()
|
let done = q.defer()
|
||||||
npmtsOra.text('Check Module: Check devDependencies...')
|
plugins.beautylog.ora.text('Check Module: Check devDependencies...')
|
||||||
let depcheckOptionsMerged = plugins.lodash.merge(depcheckOptions, {
|
let depcheckOptionsMerged = plugins.lodash.merge(depcheckOptions, {
|
||||||
ignoreDirs: [ // folder with these names will be ignored
|
ignoreDirs: [ // folder with these names will be ignored
|
||||||
'ts',
|
'ts',
|
||||||
@ -109,14 +108,14 @@ let checkDevDependencies = (configArg) => {
|
|||||||
|
|
||||||
let checkNodeVersion = (configArg) => {
|
let checkNodeVersion = (configArg) => {
|
||||||
let done = q.defer()
|
let done = q.defer()
|
||||||
npmtsOra.text('checking node version')
|
plugins.beautylog.ora.text('checking node version')
|
||||||
done.resolve(configArg)
|
done.resolve(configArg)
|
||||||
return done.promise
|
return done.promise
|
||||||
}
|
}
|
||||||
|
|
||||||
export let run = (configArg) => {
|
export let run = (configArg) => {
|
||||||
let done = q.defer()
|
let done = q.defer()
|
||||||
npmtsOra.text('Check Module: ...')
|
plugins.beautylog.ora.text('Check Module: ...')
|
||||||
checkProjectTypings(configArg)
|
checkProjectTypings(configArg)
|
||||||
.then(checkDependencies)
|
.then(checkDependencies)
|
||||||
.then(checkDevDependencies)
|
.then(checkDevDependencies)
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
import * as q from 'q'
|
import * as q from 'smartq'
|
||||||
import paths = require('../npmts.paths')
|
import paths = require('../npmts.paths')
|
||||||
|
|
||||||
import { npmtsOra } from '../npmts.log'
|
|
||||||
|
|
||||||
import plugins = require('./mod00.plugins')
|
import plugins = require('./mod00.plugins')
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* removes the dist directory which will be entirely rebuild
|
* removes the dist directory which will be entirely rebuild
|
||||||
*/
|
*/
|
||||||
let removeDist = function () {
|
let removeDist = function () {
|
||||||
npmtsOra.text('cleaning dist folder')
|
plugins.beautylog.ora.text('cleaning dist folder')
|
||||||
return plugins.smartfile.fs.remove(paths.distDir)
|
return plugins.smartfile.fs.remove(paths.distDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,12 +27,12 @@ let removeTestDeclarations = function () {
|
|||||||
* remove old pages
|
* remove old pages
|
||||||
*/
|
*/
|
||||||
let removePages = function () {
|
let removePages = function () {
|
||||||
npmtsOra.text('cleaning pages folder')
|
plugins.beautylog.ora.text('cleaning pages folder')
|
||||||
return plugins.smartfile.fs.remove(paths.pagesDir)
|
return plugins.smartfile.fs.remove(paths.pagesDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
export let run = function (configArg) {
|
export let run = function (configArg) {
|
||||||
npmtsOra.text('cleaning up from previous builds...')
|
plugins.beautylog.ora.text('cleaning up from previous builds...')
|
||||||
let done = q.defer()
|
let done = q.defer()
|
||||||
removeDist()
|
removeDist()
|
||||||
.then(removeTestDeclarations)
|
.then(removeTestDeclarations)
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
import * as q from 'q'
|
import * as q from 'smartq'
|
||||||
|
|
||||||
import * as paths from '../npmts.paths'
|
import * as paths from '../npmts.paths'
|
||||||
import { npmtsOra } from '../npmts.log'
|
|
||||||
|
|
||||||
import * as plugins from './mod00.plugins'
|
import * as plugins from './mod00.plugins'
|
||||||
|
|
||||||
export let run = function (configArg) {
|
export let run = function (configArg) {
|
||||||
let done = q.defer()
|
let done = q.defer()
|
||||||
let config = configArg
|
let config = configArg
|
||||||
npmtsOra.text('now compiling ' + 'TypeScript'.yellow)
|
plugins.beautylog.ora.text('now compiling ' + 'TypeScript'.yellow)
|
||||||
plugins.tsn.compileGlobStringObject(config.ts,config.tsOptions,paths.cwd)
|
plugins.tsn.compileGlobStringObject(config.ts,config.tsOptions,paths.cwd)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
plugins.beautylog.ok('compiled main TypeScript!')
|
plugins.beautylog.ok('compiled main TypeScript!')
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
export * from '../npmts.plugins'
|
export * from '../npmts.plugins'
|
||||||
|
|
||||||
import * as tsn from 'tsn'
|
import * as tsn from 'tsn'
|
||||||
import * as shelljs from 'shelljs'
|
|
||||||
import * as smartchok from 'smartchok'
|
import * as smartchok from 'smartchok'
|
||||||
import * as smartstream from 'smartstream'
|
import * as smartstream from 'smartstream'
|
||||||
|
|
||||||
export {
|
export {
|
||||||
tsn,
|
tsn,
|
||||||
shelljs,
|
|
||||||
smartchok,
|
smartchok,
|
||||||
smartstream
|
smartstream
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
/* ------------------------------------------
|
/* ------------------------------------------
|
||||||
* This module creates TypeScript documentation
|
* This module creates TypeScript documentation
|
||||||
* -------------------------------------------- */
|
* -------------------------------------------- */
|
||||||
import * as q from 'q'
|
import * as q from 'smartq'
|
||||||
|
|
||||||
import * as paths from '../npmts.paths'
|
import * as paths from '../npmts.paths'
|
||||||
import { npmtsOra } from '../npmts.log'
|
|
||||||
import { INpmtsConfig } from '../npmts.config'
|
import { INpmtsConfig } from '../npmts.config'
|
||||||
|
|
||||||
import * as plugins from './mod01.plugins'
|
import * as plugins from './mod01.plugins'
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
import plugins = require('./mod02.plugins')
|
import plugins = require('./mod02.plugins')
|
||||||
import paths = require('../npmts.paths')
|
import paths = require('../npmts.paths')
|
||||||
|
|
||||||
import * as q from 'q'
|
import * as q from 'smartq'
|
||||||
|
|
||||||
import { npmtsOra } from '../npmts.log'
|
|
||||||
import { INpmtsConfig } from '../npmts.config'
|
import { INpmtsConfig } from '../npmts.config'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -14,8 +13,8 @@ import { INpmtsConfig } from '../npmts.config'
|
|||||||
* @returns INpmtsConfig
|
* @returns INpmtsConfig
|
||||||
*/
|
*/
|
||||||
let mocha = function (configArg: INpmtsConfig) {
|
let mocha = function (configArg: INpmtsConfig) {
|
||||||
npmtsOra.text('Instrumentalizing and testing transpiled JS')
|
plugins.beautylog.ora.text('Instrumentalizing and testing transpiled JS')
|
||||||
npmtsOra.end() // end npmtsOra for tests.
|
plugins.beautylog.ora.end() // end plugins.beautylog.ora for tests.
|
||||||
let done = q.defer()
|
let done = q.defer()
|
||||||
|
|
||||||
let coverageSmartstream = new plugins.smartstream.Smartstream([
|
let coverageSmartstream = new plugins.smartstream.Smartstream([
|
||||||
@ -25,14 +24,13 @@ let mocha = function (configArg: INpmtsConfig) {
|
|||||||
target: 'ES5',
|
target: 'ES5',
|
||||||
emitDecoratorMetadata: true,
|
emitDecoratorMetadata: true,
|
||||||
experimentalDecorators: true,
|
experimentalDecorators: true,
|
||||||
lib: ['es2015.promise','es5']
|
lib: ['DOM', 'ES5', 'ES2015.Promise', 'ES2015.Generator', 'ES2015.Iterable']
|
||||||
}),
|
}),
|
||||||
plugins.gulpIstanbul({
|
plugins.gulpIstanbul({
|
||||||
}),
|
}),
|
||||||
plugins.gulpSourcemaps.write(),
|
plugins.gulpSourcemaps.write(),
|
||||||
plugins.gulpFunction.forEach(async file => {
|
plugins.gulpFunction.forEach(async file => {
|
||||||
file.path = file.path.replace(paths.tsDir, paths.distDir)
|
file.path = file.path.replace(paths.tsDir, paths.distDir)
|
||||||
console.log(file.path)
|
|
||||||
}),
|
}),
|
||||||
plugins.gulpInjectModules(),
|
plugins.gulpInjectModules(),
|
||||||
plugins.through2.obj(
|
plugins.through2.obj(
|
||||||
@ -50,7 +48,8 @@ let mocha = function (configArg: INpmtsConfig) {
|
|||||||
plugins.gulpTypeScript({
|
plugins.gulpTypeScript({
|
||||||
target: 'ES5',
|
target: 'ES5',
|
||||||
emitDecoratorMetadata: true,
|
emitDecoratorMetadata: true,
|
||||||
experimentalDecorators: true
|
experimentalDecorators: true,
|
||||||
|
lib: ['DOM', 'ES5', 'ES2015.Promise', 'ES2015.Generator', 'ES2015.Iterable']
|
||||||
}),
|
}),
|
||||||
plugins.gulpInjectModules(),
|
plugins.gulpInjectModules(),
|
||||||
plugins.gulpMocha(),
|
plugins.gulpMocha(),
|
||||||
@ -108,7 +107,7 @@ export let run = function (configArg: INpmtsConfig) {
|
|||||||
let done = q.defer<INpmtsConfig>()
|
let done = q.defer<INpmtsConfig>()
|
||||||
let config = configArg
|
let config = configArg
|
||||||
if (config.test === true) {
|
if (config.test === true) {
|
||||||
npmtsOra.text('now starting tests')
|
plugins.beautylog.ora.text('now starting tests')
|
||||||
plugins.beautylog.log(
|
plugins.beautylog.log(
|
||||||
'------------------------------------------------------\n' +
|
'------------------------------------------------------\n' +
|
||||||
'*************************** TESTS: ***************************\n' +
|
'*************************** TESTS: ***************************\n' +
|
||||||
@ -121,7 +120,7 @@ export let run = function (configArg: INpmtsConfig) {
|
|||||||
done.resolve(config)
|
done.resolve(config)
|
||||||
}).catch(err => { console.log(err) })
|
}).catch(err => { console.log(err) })
|
||||||
} else {
|
} else {
|
||||||
npmtsOra.end()
|
plugins.beautylog.ora.end()
|
||||||
done.resolve(config)
|
done.resolve(config)
|
||||||
}
|
}
|
||||||
return done.promise
|
return done.promise
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as q from 'q'
|
import * as q from 'smartq'
|
||||||
|
|
||||||
import * as plugins from './npmts.plugins'
|
import * as plugins from './npmts.plugins'
|
||||||
import * as paths from './npmts.paths'
|
import * as paths from './npmts.paths'
|
||||||
@ -7,8 +7,6 @@ import * as NpmtsMods from './npmts.mods'
|
|||||||
import * as NpmtsWatch from './npmts.watch'
|
import * as NpmtsWatch from './npmts.watch'
|
||||||
import * as NpmtsShip from './npmts.ship'
|
import * as NpmtsShip from './npmts.ship'
|
||||||
|
|
||||||
import { npmtsOra } from './npmts.log'
|
|
||||||
|
|
||||||
export let run = () => {
|
export let run = () => {
|
||||||
let done = q.defer()
|
let done = q.defer()
|
||||||
let npmtsProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.npmtsPackageRoot)
|
let npmtsProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.npmtsPackageRoot)
|
||||||
@ -21,7 +19,7 @@ export let run = () => {
|
|||||||
})
|
})
|
||||||
.then((configArg: NpmtsConfig.INpmtsConfig) => {
|
.then((configArg: NpmtsConfig.INpmtsConfig) => {
|
||||||
let done = q.defer()
|
let done = q.defer()
|
||||||
npmtsOra.start('loading additional modules...')
|
plugins.beautylog.ora.start('loading additional modules...')
|
||||||
NpmtsMods.mod00.load()
|
NpmtsMods.mod00.load()
|
||||||
.then((mod00) => {
|
.then((mod00) => {
|
||||||
return mod00.run(configArg)
|
return mod00.run(configArg)
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
import plugins = require('./npmts.plugins')
|
import plugins = require('./npmts.plugins')
|
||||||
import paths = require('./npmts.paths')
|
import paths = require('./npmts.paths')
|
||||||
|
|
||||||
import * as q from 'q'
|
import * as q from 'smartq'
|
||||||
|
|
||||||
import { npmtsOra } from './npmts.log'
|
|
||||||
|
|
||||||
export type npmtsMode = 'default' | 'custom'
|
export type npmtsMode = 'default' | 'custom'
|
||||||
|
|
||||||
@ -19,7 +17,7 @@ export interface INpmtsConfig {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export var run = function (argvArg) {
|
export let run = function (argvArg) {
|
||||||
let done = q.defer()
|
let done = q.defer()
|
||||||
let defaultConfig: INpmtsConfig = {
|
let defaultConfig: INpmtsConfig = {
|
||||||
argv: undefined,
|
argv: undefined,
|
||||||
@ -33,7 +31,7 @@ export var run = function (argvArg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// mix with configfile
|
// mix with configfile
|
||||||
npmtsOra.text('running npmextra')
|
plugins.beautylog.ora.text('running npmextra')
|
||||||
|
|
||||||
let localNpmextra = new plugins.npmextra.Npmextra(paths.cwd)
|
let localNpmextra = new plugins.npmextra.Npmextra(paths.cwd)
|
||||||
let config: INpmtsConfig = localNpmextra.dataFor<INpmtsConfig>(
|
let config: INpmtsConfig = localNpmextra.dataFor<INpmtsConfig>(
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
import {Ora} from 'beautylog'
|
|
||||||
export let npmtsOra = new Ora('setting up TaskChain','cyan')
|
|
@ -1,4 +1,4 @@
|
|||||||
import * as q from 'q'
|
import * as q from 'smartq'
|
||||||
|
|
||||||
import * as plugins from './npmts.plugins'
|
import * as plugins from './npmts.plugins'
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as q from 'q'
|
import * as q from 'smartq'
|
||||||
import * as smartchok from 'smartchok'
|
import * as smartchok from 'smartchok'
|
||||||
|
|
||||||
import * as plugins from './npmts.plugins'
|
import * as plugins from './npmts.plugins'
|
||||||
|
Reference in New Issue
Block a user