tscoverage/ts/npmts.assets.ts

24 lines
725 B
TypeScript
Raw Normal View History

2016-09-06 15:21:25 +00:00
import plugins = require('./npmts.plugins')
import paths = require('./npmts.paths')
2016-10-02 18:35:13 +00:00
import * as q from 'q'
2016-09-06 15:21:25 +00:00
import {npmtsOra} from './npmts.promisechain'
2016-03-14 03:32:52 +00:00
export var run = function(configArg){
2016-10-02 18:35:13 +00:00
let done = q.defer()
2016-09-06 15:21:25 +00:00
let config = configArg
npmtsOra.text('now looking at ' + 'required assets'.yellow)
if (config.cli === true) {
2016-07-19 18:31:49 +00:00
plugins.smartfile.fs.copySync(
2016-09-06 15:21:25 +00:00
plugins.path.join(paths.npmtsAssetsDir,'cli.js'),
plugins.path.join(paths.distDir,'cli.js')
)
plugins.beautylog.ok('installed CLI assets!')
done.resolve(config)
2016-03-14 03:32:52 +00:00
} else {
2016-09-06 15:21:25 +00:00
plugins.beautylog.ok('No additional assets required!')
done.resolve(config)
2016-03-14 03:32:52 +00:00
}
2016-09-06 15:21:25 +00:00
return done.promise
}