@platform/react.ssr
Version:
An SSR (server-side-render) system for react apps bundled with ParcelJS and hosted on S3.
25 lines (24 loc) • 937 B
JavaScript
import * as bundle from './cmd.bundle';
import * as pull from './cmd.pull';
import * as pushBundle from './cmd.pushBundle';
import * as release from './cmd.release';
import * as reset from './cmd.reset';
import { cli } from './common';
const app = cli.create('ssr');
app
.command(['pull'], 'Pull the latet version of the manifest from the cloud.', yargs => {
return yargs;
}, async (argv) => pull.run())
.command(['bundle', 'b'], 'Prepare, bundle and push javascript.', yargs => {
return yargs;
}, async (argv) => bundle.run())
.command(['push', 'p'], 'Push bundle to S3.', yargs => {
return yargs;
}, async (argv) => pushBundle.run({ prompt: true }))
.command(['release', 'r'], 'Change the release version of a site.', yargs => {
return yargs;
}, async (argv) => release.run())
.command(['reset'], 'Reset the cache on sites.', yargs => {
return yargs;
}, async (argv) => reset.run());
app.run();