timpla
Version:
An optimal website development experience for [server-side] web frameworks.
29 lines • 1.02 kB
JavaScript
;
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
var opn = require("open");
var internal_1 = require("../internal");
exports.open = function (timplaConfig) { return function (cb) {
var env = internal_1.TIMPLA_PROCESS.isProduction ? 'production' : 'development';
var opnOptions = timplaConfig[env] && timplaConfig[env].open;
if (opnOptions === false) {
cb();
return;
}
if (opnOptions) {
// Set wait to false so build can terminate
opn(opnOptions.target, __assign({}, opnOptions.options, { wait: false }));
}
cb();
}; };
//# sourceMappingURL=open.js.map