update beautylog
This commit is contained in:
4
dist/mod00/index.js
vendored
4
dist/mod00/index.js
vendored
@ -3,14 +3,14 @@
|
||||
* This module compiles TypeScript files
|
||||
* -------------------------------------------- */
|
||||
const q = require("smartq");
|
||||
const npmts_log_1 = require("../npmts.log");
|
||||
const plugins = require("./mod00.plugins");
|
||||
const NpmtsAssets = require("./mod00.assets");
|
||||
const NpmtsCheck = require("./mod00.check");
|
||||
const NpmtsClean = require("./mod00.clean");
|
||||
const NpmtsCompile = require("./mod00.compile");
|
||||
exports.run = function (configArg) {
|
||||
let done = q.defer();
|
||||
npmts_log_1.npmtsOra.text('starting TypeScript Compilation');
|
||||
plugins.beautylog.ora.text('starting TypeScript Compilation');
|
||||
NpmtsClean.run(configArg)
|
||||
.then(NpmtsCheck.run)
|
||||
.then(NpmtsCompile.run)
|
||||
|
3
dist/mod00/mod00.assets.js
vendored
3
dist/mod00/mod00.assets.js
vendored
@ -1,13 +1,12 @@
|
||||
"use strict";
|
||||
const q = require("smartq");
|
||||
const paths = require("../npmts.paths");
|
||||
const npmts_log_1 = require("../npmts.log");
|
||||
const plugins = require("./mod00.plugins");
|
||||
const mod00_check_1 = require("../mod00/mod00.check");
|
||||
exports.run = function (configArg) {
|
||||
let done = q.defer();
|
||||
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) {
|
||||
let mainJsPath = mod00_check_1.projectInfo.packageJson.main;
|
||||
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 projectinfo_1 = require("projectinfo");
|
||||
const paths = require("../npmts.paths");
|
||||
const npmts_log_1 = require("../npmts.log");
|
||||
const plugins = require("./mod00.plugins");
|
||||
let checkProjectTypings = (configArg) => {
|
||||
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);
|
||||
if (typeof exports.projectInfo.packageJson.typings === 'undefined') {
|
||||
plugins.beautylog.error(`please add typings field to package.json`);
|
||||
@ -32,7 +31,7 @@ const depcheckOptions = {
|
||||
};
|
||||
let checkDependencies = (configArg) => {
|
||||
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, {
|
||||
ignoreDirs: [
|
||||
'test',
|
||||
@ -68,7 +67,7 @@ let checkDependencies = (configArg) => {
|
||||
};
|
||||
let checkDevDependencies = (configArg) => {
|
||||
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, {
|
||||
ignoreDirs: [
|
||||
'ts',
|
||||
@ -103,13 +102,13 @@ let checkDevDependencies = (configArg) => {
|
||||
};
|
||||
let checkNodeVersion = (configArg) => {
|
||||
let done = q.defer();
|
||||
npmts_log_1.npmtsOra.text('checking node version');
|
||||
plugins.beautylog.ora.text('checking node version');
|
||||
done.resolve(configArg);
|
||||
return done.promise;
|
||||
};
|
||||
exports.run = (configArg) => {
|
||||
let done = q.defer();
|
||||
npmts_log_1.npmtsOra.text('Check Module: ...');
|
||||
plugins.beautylog.ora.text('Check Module: ...');
|
||||
checkProjectTypings(configArg)
|
||||
.then(checkDependencies)
|
||||
.then(checkDevDependencies)
|
||||
|
7
dist/mod00/mod00.clean.js
vendored
7
dist/mod00/mod00.clean.js
vendored
@ -1,13 +1,12 @@
|
||||
"use strict";
|
||||
const q = require("smartq");
|
||||
const paths = require("../npmts.paths");
|
||||
const npmts_log_1 = require("../npmts.log");
|
||||
const plugins = require("./mod00.plugins");
|
||||
/**
|
||||
* removes the dist directory which will be entirely rebuild
|
||||
*/
|
||||
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);
|
||||
};
|
||||
/**
|
||||
@ -25,11 +24,11 @@ let removeTestDeclarations = function () {
|
||||
* remove old pages
|
||||
*/
|
||||
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);
|
||||
};
|
||||
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();
|
||||
removeDist()
|
||||
.then(removeTestDeclarations)
|
||||
|
3
dist/mod00/mod00.compile.js
vendored
3
dist/mod00/mod00.compile.js
vendored
@ -1,12 +1,11 @@
|
||||
"use strict";
|
||||
const q = require("smartq");
|
||||
const paths = require("../npmts.paths");
|
||||
const npmts_log_1 = require("../npmts.log");
|
||||
const plugins = require("./mod00.plugins");
|
||||
exports.run = function (configArg) {
|
||||
let done = q.defer();
|
||||
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)
|
||||
.then(() => {
|
||||
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 paths = require("../npmts.paths");
|
||||
const q = require("smartq");
|
||||
const npmts_log_1 = require("../npmts.log");
|
||||
/**
|
||||
* runs mocha
|
||||
* @returns INpmtsConfig
|
||||
*/
|
||||
let mocha = function (configArg) {
|
||||
npmts_log_1.npmtsOra.text('Instrumentalizing and testing transpiled JS');
|
||||
npmts_log_1.npmtsOra.end(); // end npmtsOra for tests.
|
||||
plugins.beautylog.ora.text('Instrumentalizing and testing transpiled JS');
|
||||
plugins.beautylog.ora.end(); // end plugins.beautylog.ora for tests.
|
||||
let done = q.defer();
|
||||
let coverageSmartstream = new plugins.smartstream.Smartstream([
|
||||
plugins.gulp.src([plugins.path.join(paths.cwd, './ts/**/*.ts')]),
|
||||
@ -103,7 +102,7 @@ exports.run = function (configArg) {
|
||||
let done = q.defer();
|
||||
let config = configArg;
|
||||
if (config.test === true) {
|
||||
npmts_log_1.npmtsOra.text('now starting tests');
|
||||
plugins.beautylog.ora.text('now starting tests');
|
||||
plugins.beautylog.log('------------------------------------------------------\n' +
|
||||
'*************************** TESTS: ***************************\n' +
|
||||
'--------------------------------------------------------------');
|
||||
@ -114,7 +113,7 @@ exports.run = function (configArg) {
|
||||
}).catch(err => { console.log(err); });
|
||||
}
|
||||
else {
|
||||
npmts_log_1.npmtsOra.end();
|
||||
plugins.beautylog.ora.end();
|
||||
done.resolve(config);
|
||||
}
|
||||
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 NpmtsWatch = require("./npmts.watch");
|
||||
const NpmtsShip = require("./npmts.ship");
|
||||
const npmts_log_1 = require("./npmts.log");
|
||||
exports.run = () => {
|
||||
let done = q.defer();
|
||||
let npmtsProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.npmtsPackageRoot);
|
||||
@ -19,7 +18,7 @@ exports.run = () => {
|
||||
})
|
||||
.then((configArg) => {
|
||||
let done = q.defer();
|
||||
npmts_log_1.npmtsOra.start('loading additional modules...');
|
||||
plugins.beautylog.ora.start('loading additional modules...');
|
||||
NpmtsMods.mod00.load()
|
||||
.then((mod00) => {
|
||||
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 paths = require("./npmts.paths");
|
||||
const q = require("smartq");
|
||||
const npmts_log_1 = require("./npmts.log");
|
||||
;
|
||||
exports.run = function (argvArg) {
|
||||
let done = q.defer();
|
||||
@ -17,7 +16,7 @@ exports.run = function (argvArg) {
|
||||
watch: false
|
||||
};
|
||||
// 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 config = localNpmextra.dataFor('npmts', defaultConfig);
|
||||
// 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');
|
Reference in New Issue
Block a user