emit legacy build

This commit is contained in:
Rich Harris
2018-08-30 22:58:07 -04:00
parent afcd643035
commit e00b315dec
4 changed files with 45 additions and 8 deletions

View File

@@ -31,8 +31,13 @@ prog.command('build [dest]')
.describe('Create a production-ready version of your app')
.option('-p, --port', 'Default of process.env.PORT', '3000')
.option('--bundler', 'Specify a bundler (rollup or webpack, blank for auto)')
.option('--legacy', 'Create separate legacy build')
.example(`build custom-dir -p 4567`)
.action(async (dest = 'build', opts: { port: string, bundler?: string }) => {
.action(async (dest = 'build', opts: {
port: string,
legacy: boolean,
bundler?: string
}) => {
console.log(`> Building...`);
process.env.NODE_ENV = process.env.NODE_ENV || 'production';
@@ -78,9 +83,11 @@ prog.command('export [dest]')
.option('--build-dir', 'Specify a custom temporary build directory', '.sapper/prod')
.option('--basepath', 'Specify a base path')
.option('--timeout', 'Milliseconds to wait for a page (--no-timeout to disable)', 5000)
.option('--legacy', 'Create separate legacy build')
.option('--bundler', 'Specify a bundler (rollup or webpack, blank for auto)')
.action(async (dest = 'export', opts: {
build: boolean,
legacy: boolean,
bundler?: string,
'build-dir': string,
basepath?: string,