npmci/dist/npmci.build.js

19 lines
1.9 KiB
JavaScript
Raw Normal View History

2016-06-02 15:57:01 +00:00
"use strict";
require("typings-global");
var plugins = require("./npmci.plugins");
var env = require("./npmci.env");
2016-06-02 15:57:01 +00:00
exports.build = function (commandArg) {
2016-06-03 00:11:03 +00:00
switch (commandArg) {
case "docker":
return docker();
}
};
var docker = function () {
var done = plugins.q.defer();
2016-06-03 14:27:12 +00:00
plugins.shelljs.exec("docker build -t " + env.dockerTag());
2016-06-03 00:11:03 +00:00
done.resolve();
return done.promise;
};
2016-06-02 15:57:01 +00:00
2016-06-03 14:27:12 +00:00
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLmJ1aWxkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUFnQixDQUFDLENBQUE7QUFDeEIsSUFBWSxPQUFPLFdBQU0saUJBQWlCLENBQUMsQ0FBQTtBQUUzQyxJQUFZLEdBQUcsV0FBTSxhQUFhLENBQUMsQ0FBQTtBQUV4QixhQUFLLEdBQUcsVUFBUyxVQUFVO0lBQ2xDLE1BQU0sQ0FBQSxDQUFDLFVBQVUsQ0FBQyxDQUFBLENBQUM7UUFDZixLQUFLLFFBQVE7WUFDVCxNQUFNLENBQUMsTUFBTSxFQUFFLENBQUM7SUFDeEIsQ0FBQztBQUNMLENBQUMsQ0FBQTtBQUVELElBQUksTUFBTSxHQUFHO0lBQ1QsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQztJQUM3QixPQUFPLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxrQkFBa0IsR0FBRyxHQUFHLENBQUMsU0FBUyxFQUFFLENBQUMsQ0FBQztJQUMzRCxJQUFJLENBQUMsT0FBTyxFQUFFLENBQUM7SUFDZixNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0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