update beautylog
This commit is contained in:
parent
3e4ac03a63
commit
d94d66ef19
4
dist/mod00/index.js
vendored
4
dist/mod00/index.js
vendored
@ -3,14 +3,14 @@
|
|||||||
* This module compiles TypeScript files
|
* This module compiles TypeScript files
|
||||||
* -------------------------------------------- */
|
* -------------------------------------------- */
|
||||||
const q = require("smartq");
|
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)
|
||||||
|
3
dist/mod00/mod00.assets.js
vendored
3
dist/mod00/mod00.assets.js
vendored
@ -1,13 +1,12 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
const q = require("smartq");
|
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'));
|
||||||
|
11
dist/mod00/mod00.check.js
vendored
11
dist/mod00/mod00.check.js
vendored
@ -2,11 +2,10 @@
|
|||||||
const q = require("smartq");
|
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)
|
||||||
|
7
dist/mod00/mod00.clean.js
vendored
7
dist/mod00/mod00.clean.js
vendored
@ -1,13 +1,12 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
const q = require("smartq");
|
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)
|
||||||
|
3
dist/mod00/mod00.compile.js
vendored
3
dist/mod00/mod00.compile.js
vendored
@ -1,12 +1,11 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
const q = require("smartq");
|
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!');
|
||||||
|
9
dist/mod02/index.js
vendored
9
dist/mod02/index.js
vendored
@ -13,14 +13,13 @@ 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("smartq");
|
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')]),
|
||||||
@ -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;
|
||||||
|
3
dist/npmts.cli.js
vendored
3
dist/npmts.cli.js
vendored
@ -6,7 +6,6 @@ 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);
|
||||||
|
3
dist/npmts.config.js
vendored
3
dist/npmts.config.js
vendored
@ -2,7 +2,6 @@
|
|||||||
const plugins = require("./npmts.plugins");
|
const plugins = require("./npmts.plugins");
|
||||||
const paths = require("./npmts.paths");
|
const paths = require("./npmts.paths");
|
||||||
const q = require("smartq");
|
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');
|
|
@ -40,7 +40,7 @@
|
|||||||
"@types/gulp-sourcemaps": "0.0.29",
|
"@types/gulp-sourcemaps": "0.0.29",
|
||||||
"@types/minimatch": "^2.0.29",
|
"@types/minimatch": "^2.0.29",
|
||||||
"@types/through2": "^2.0.32",
|
"@types/through2": "^2.0.32",
|
||||||
"beautylog": "6.0.6",
|
"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",
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
* -------------------------------------------- */
|
* -------------------------------------------- */
|
||||||
import * as q from 'smartq'
|
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'
|
||||||
@ -15,7 +14,7 @@ import * as NpmtsCompile from './mod00.compile'
|
|||||||
|
|
||||||
export let run = function(configArg: INpmtsConfig): 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,7 +1,6 @@
|
|||||||
import * as q from 'smartq'
|
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'
|
||||||
@ -9,7 +8,7 @@ import { projectInfo } from '../mod00/mod00.check'
|
|||||||
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 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'))
|
||||||
|
@ -2,7 +2,6 @@ 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,7 +9,7 @@ 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`)
|
||||||
@ -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 'smartq'
|
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 'smartq'
|
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!')
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
import * as q from 'smartq'
|
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'
|
||||||
|
@ -6,7 +6,6 @@ import paths = require('../npmts.paths')
|
|||||||
|
|
||||||
import * as q from 'smartq'
|
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([
|
||||||
@ -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
|
||||||
|
@ -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)
|
||||||
|
@ -3,8 +3,6 @@ import paths = require('./npmts.paths')
|
|||||||
|
|
||||||
import * as q from 'smartq'
|
import * as q from 'smartq'
|
||||||
|
|
||||||
import { npmtsOra } from './npmts.log'
|
|
||||||
|
|
||||||
export type npmtsMode = 'default' | 'custom'
|
export type npmtsMode = 'default' | 'custom'
|
||||||
|
|
||||||
export interface INpmtsConfig {
|
export interface INpmtsConfig {
|
||||||
@ -33,7 +31,7 @@ export let 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')
|
|
Loading…
Reference in New Issue
Block a user