@platform/react.ssr
Version:
An SSR (server-side-render) system for react apps bundled with ParcelJS and hosted on S3.
39 lines (38 loc) • 1.8 kB
JavaScript
;
var _this = this;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var bundle = require("./cmd.bundle");
var pull = require("./cmd.pull");
var pushBundle = require("./cmd.pushBundle");
var release = require("./cmd.release");
var reset = require("./cmd.reset");
var common_1 = require("./common");
var app = common_1.cli.create('ssr');
app
.command(['pull'], 'Pull the latet version of the manifest from the cloud.', function (yargs) {
return yargs;
}, function (argv) { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
return [2, pull.run()];
}); }); })
.command(['bundle', 'b'], 'Prepare, bundle and push javascript.', function (yargs) {
return yargs;
}, function (argv) { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
return [2, bundle.run()];
}); }); })
.command(['push', 'p'], 'Push bundle to S3.', function (yargs) {
return yargs;
}, function (argv) { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
return [2, pushBundle.run({ prompt: true })];
}); }); })
.command(['release', 'r'], 'Change the release version of a site.', function (yargs) {
return yargs;
}, function (argv) { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
return [2, release.run()];
}); }); })
.command(['reset'], 'Reset the cache on sites.', function (yargs) {
return yargs;
}, function (argv) { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
return [2, reset.run()];
}); }); });
app.run();