tscoverage/ts/npmts.assets.ts

22 lines
742 B
TypeScript
Raw Permalink Normal View History

2016-05-25 03:23:48 +00:00
import "typings-global";
2016-03-14 03:32:52 +00:00
import plugins = require("./npmts.plugins");
import paths = require("./npmts.paths");
2016-05-17 00:32:40 +00:00
import {npmtsOra} from "./npmts.promisechain";
2016-03-14 03:32:52 +00:00
export var run = function(configArg){
let done = plugins.Q.defer();
let config = configArg;
npmtsOra.text("now looking at " + "required assets".yellow);
2016-03-14 03:32:52 +00:00
if(config.cli == true){
2016-07-19 18:31:49 +00:00
plugins.smartfile.fs.copySync(
plugins.path.join(paths.npmtsAssetsDir,"cli.js"),
plugins.path.join(paths.distDir,"cli.js")
);
2016-05-17 00:32:40 +00:00
plugins.beautylog.ok("installed CLI assets!");
2016-03-14 03:32:52 +00:00
done.resolve(config);
} else {
2016-07-19 18:31:49 +00:00
plugins.beautylog.ok("No additional assets required!")
2016-03-14 03:32:52 +00:00
done.resolve(config);
}
return done.promise;
};