update beautylog
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
* -------------------------------------------- */
|
||||
import * as q from 'smartq'
|
||||
|
||||
import { npmtsOra } from '../npmts.log'
|
||||
import { INpmtsConfig } from '../npmts.config'
|
||||
|
||||
import * as plugins from './mod00.plugins'
|
||||
@ -15,7 +14,7 @@ import * as NpmtsCompile from './mod00.compile'
|
||||
|
||||
export let run = function(configArg: INpmtsConfig): Promise<INpmtsConfig> {
|
||||
let done = q.defer<INpmtsConfig>()
|
||||
npmtsOra.text('starting TypeScript Compilation')
|
||||
plugins.beautylog.ora.text('starting TypeScript Compilation')
|
||||
NpmtsClean.run(configArg)
|
||||
.then(NpmtsCheck.run)
|
||||
.then(NpmtsCompile.run)
|
||||
|
@ -1,7 +1,6 @@
|
||||
import * as q from 'smartq'
|
||||
|
||||
import paths = require('../npmts.paths')
|
||||
import { npmtsOra } from '../npmts.log'
|
||||
|
||||
import plugins = require('./mod00.plugins')
|
||||
import { projectInfo } from '../mod00/mod00.check'
|
||||
@ -9,7 +8,7 @@ import { projectInfo } from '../mod00/mod00.check'
|
||||
export let run = function(configArg){
|
||||
let done = q.defer()
|
||||
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) {
|
||||
let mainJsPath = projectInfo.packageJson.main
|
||||
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 * as paths from '../npmts.paths'
|
||||
import { npmtsOra } from '../npmts.log'
|
||||
|
||||
import * as plugins from './mod00.plugins'
|
||||
|
||||
@ -10,7 +9,7 @@ export let projectInfo: ProjectinfoNpm
|
||||
|
||||
let checkProjectTypings = (configArg) => {
|
||||
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)
|
||||
if (typeof projectInfo.packageJson.typings === 'undefined') {
|
||||
plugins.beautylog.error(`please add typings field to package.json`)
|
||||
@ -37,7 +36,7 @@ const depcheckOptions = {
|
||||
|
||||
let checkDependencies = (configArg) => {
|
||||
let done = q.defer()
|
||||
npmtsOra.text('Check Module: Check Dependencies...')
|
||||
plugins.beautylog.ora.text('Check Module: Check Dependencies...')
|
||||
let depcheckOptionsMerged = plugins.lodash.merge(depcheckOptions, {
|
||||
ignoreDirs: [ // folder with these names will be ignored
|
||||
'test',
|
||||
@ -73,7 +72,7 @@ let checkDependencies = (configArg) => {
|
||||
|
||||
let checkDevDependencies = (configArg) => {
|
||||
let done = q.defer()
|
||||
npmtsOra.text('Check Module: Check devDependencies...')
|
||||
plugins.beautylog.ora.text('Check Module: Check devDependencies...')
|
||||
let depcheckOptionsMerged = plugins.lodash.merge(depcheckOptions, {
|
||||
ignoreDirs: [ // folder with these names will be ignored
|
||||
'ts',
|
||||
@ -109,14 +108,14 @@ let checkDevDependencies = (configArg) => {
|
||||
|
||||
let checkNodeVersion = (configArg) => {
|
||||
let done = q.defer()
|
||||
npmtsOra.text('checking node version')
|
||||
plugins.beautylog.ora.text('checking node version')
|
||||
done.resolve(configArg)
|
||||
return done.promise
|
||||
}
|
||||
|
||||
export let run = (configArg) => {
|
||||
let done = q.defer()
|
||||
npmtsOra.text('Check Module: ...')
|
||||
plugins.beautylog.ora.text('Check Module: ...')
|
||||
checkProjectTypings(configArg)
|
||||
.then(checkDependencies)
|
||||
.then(checkDevDependencies)
|
||||
|
@ -1,15 +1,13 @@
|
||||
import * as q from 'smartq'
|
||||
import paths = require('../npmts.paths')
|
||||
|
||||
import { npmtsOra } from '../npmts.log'
|
||||
|
||||
import plugins = require('./mod00.plugins')
|
||||
|
||||
/**
|
||||
* removes the dist directory which will be entirely rebuild
|
||||
*/
|
||||
let removeDist = function () {
|
||||
npmtsOra.text('cleaning dist folder')
|
||||
plugins.beautylog.ora.text('cleaning dist folder')
|
||||
return plugins.smartfile.fs.remove(paths.distDir)
|
||||
}
|
||||
|
||||
@ -29,12 +27,12 @@ let removeTestDeclarations = function () {
|
||||
* remove old pages
|
||||
*/
|
||||
let removePages = function () {
|
||||
npmtsOra.text('cleaning pages folder')
|
||||
plugins.beautylog.ora.text('cleaning pages folder')
|
||||
return plugins.smartfile.fs.remove(paths.pagesDir)
|
||||
}
|
||||
|
||||
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()
|
||||
removeDist()
|
||||
.then(removeTestDeclarations)
|
||||
|
@ -1,14 +1,13 @@
|
||||
import * as q from 'smartq'
|
||||
|
||||
import * as paths from '../npmts.paths'
|
||||
import { npmtsOra } from '../npmts.log'
|
||||
|
||||
import * as plugins from './mod00.plugins'
|
||||
|
||||
export let run = function (configArg) {
|
||||
let done = q.defer()
|
||||
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)
|
||||
.then(() => {
|
||||
plugins.beautylog.ok('compiled main TypeScript!')
|
||||
|
@ -4,7 +4,6 @@
|
||||
import * as q from 'smartq'
|
||||
|
||||
import * as paths from '../npmts.paths'
|
||||
import { npmtsOra } from '../npmts.log'
|
||||
import { INpmtsConfig } from '../npmts.config'
|
||||
|
||||
import * as plugins from './mod01.plugins'
|
||||
|
@ -6,7 +6,6 @@ import paths = require('../npmts.paths')
|
||||
|
||||
import * as q from 'smartq'
|
||||
|
||||
import { npmtsOra } from '../npmts.log'
|
||||
import { INpmtsConfig } from '../npmts.config'
|
||||
|
||||
/**
|
||||
@ -14,8 +13,8 @@ import { INpmtsConfig } from '../npmts.config'
|
||||
* @returns INpmtsConfig
|
||||
*/
|
||||
let mocha = function (configArg: INpmtsConfig) {
|
||||
npmtsOra.text('Instrumentalizing and testing transpiled JS')
|
||||
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([
|
||||
@ -108,7 +107,7 @@ export let run = function (configArg: INpmtsConfig) {
|
||||
let done = q.defer<INpmtsConfig>()
|
||||
let config = configArg
|
||||
if (config.test === true) {
|
||||
npmtsOra.text('now starting tests')
|
||||
plugins.beautylog.ora.text('now starting tests')
|
||||
plugins.beautylog.log(
|
||||
'------------------------------------------------------\n' +
|
||||
'*************************** TESTS: ***************************\n' +
|
||||
@ -121,7 +120,7 @@ export let run = function (configArg: INpmtsConfig) {
|
||||
done.resolve(config)
|
||||
}).catch(err => { console.log(err) })
|
||||
} else {
|
||||
npmtsOra.end()
|
||||
plugins.beautylog.ora.end()
|
||||
done.resolve(config)
|
||||
}
|
||||
return done.promise
|
||||
|
@ -7,8 +7,6 @@ import * as NpmtsMods from './npmts.mods'
|
||||
import * as NpmtsWatch from './npmts.watch'
|
||||
import * as NpmtsShip from './npmts.ship'
|
||||
|
||||
import { npmtsOra } from './npmts.log'
|
||||
|
||||
export let run = () => {
|
||||
let done = q.defer()
|
||||
let npmtsProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.npmtsPackageRoot)
|
||||
@ -21,7 +19,7 @@ export let run = () => {
|
||||
})
|
||||
.then((configArg: NpmtsConfig.INpmtsConfig) => {
|
||||
let done = q.defer()
|
||||
npmtsOra.start('loading additional modules...')
|
||||
plugins.beautylog.ora.start('loading additional modules...')
|
||||
NpmtsMods.mod00.load()
|
||||
.then((mod00) => {
|
||||
return mod00.run(configArg)
|
||||
|
@ -3,8 +3,6 @@ import paths = require('./npmts.paths')
|
||||
|
||||
import * as q from 'smartq'
|
||||
|
||||
import { npmtsOra } from './npmts.log'
|
||||
|
||||
export type npmtsMode = 'default' | 'custom'
|
||||
|
||||
export interface INpmtsConfig {
|
||||
@ -33,7 +31,7 @@ export let run = function (argvArg) {
|
||||
}
|
||||
|
||||
// mix with configfile
|
||||
npmtsOra.text('running npmextra')
|
||||
plugins.beautylog.ora.text('running npmextra')
|
||||
|
||||
let localNpmextra = new plugins.npmextra.Npmextra(paths.cwd)
|
||||
let config: INpmtsConfig = localNpmextra.dataFor<INpmtsConfig>(
|
||||
|
@ -1,2 +0,0 @@
|
||||
import {Ora} from 'beautylog'
|
||||
export let npmtsOra = new Ora('setting up TaskChain','cyan')
|
Reference in New Issue
Block a user