@platform/react.ssr
Version:
An SSR (server-side-render) system for react apps bundled with ParcelJS and hosted on S3.
45 lines (44 loc) • 1.92 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var config_1 = require("../config");
var common_1 = require("./common");
function run() {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var config, manifest;
var _this = this;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, config_1.Config.create()];
case 1:
config = _a.sent();
common_1.log.info();
return [4, common_1.cli
.tasks()
.task('pull latest manifest', function (e) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, config.manifest.local.ensureLatest({ minimal: true })];
case 1:
manifest = _a.sent();
return [2];
}
});
}); })
.run({ concurrent: true })];
case 2:
_a.sent();
common_1.log.info();
if (!manifest) {
common_1.log.error("Manifest could not be found.");
return [2, common_1.cli.exit(1)];
}
common_1.log.info.gray(" url: " + manifest.baseUrl);
common_1.log.info.gray(" local: " + config.manifest.local.path);
common_1.log.info();
return [2];
}
});
});
}
exports.run = run;