2016-03-14 03:32:52 +00:00
|
|
|
"use strict";
|
2016-09-14 11:16:36 +00:00
|
|
|
require("typings-global");
|
2016-09-22 21:23:16 +00:00
|
|
|
const plugins = require("./npmts.plugins");
|
|
|
|
const paths = require("./npmts.paths");
|
|
|
|
const npmts_promisechain_1 = require("./npmts.promisechain");
|
2016-03-14 03:32:52 +00:00
|
|
|
exports.run = function (configArg) {
|
2016-09-22 21:23:16 +00:00
|
|
|
let done = plugins.q.defer();
|
|
|
|
let config = configArg;
|
2016-09-06 15:21:25 +00:00
|
|
|
npmts_promisechain_1.npmtsOra.text('now looking at ' + 'required assets'.yellow);
|
|
|
|
if (config.cli === true) {
|
|
|
|
plugins.smartfile.fs.copySync(plugins.path.join(paths.npmtsAssetsDir, 'cli.js'), plugins.path.join(paths.distDir, 'cli.js'));
|
|
|
|
plugins.beautylog.ok('installed CLI assets!');
|
2016-03-14 03:32:52 +00:00
|
|
|
done.resolve(config);
|
|
|
|
}
|
|
|
|
else {
|
2016-09-06 15:21:25 +00:00
|
|
|
plugins.beautylog.ok('No additional assets required!');
|
2016-03-14 03:32:52 +00:00
|
|
|
done.resolve(config);
|
|
|
|
}
|
|
|
|
return done.promise;
|
|
|
|
};
|