implement --live and --hot - fixes #385

This commit is contained in:
Rich Harris
2018-08-29 21:51:08 -04:00
parent d63b9437b5
commit 3b098caa6e
3 changed files with 34 additions and 19 deletions

View File

@@ -11,8 +11,16 @@ prog.command('dev')
.describe('Start a development server')
.option('-p, --port', 'Specify a port')
.option('-o, --open', 'Open a browser window')
.option('-l --live', 'Reload on changes', false)
.option('--hot', 'Use hot module replacement', true)
.option('--bundler', 'Specify a bundler (rollup or webpack)')
.action(async (opts: { port: number, open: boolean, bundler?: string }) => {
.action(async (opts: {
port: number,
open: boolean,
live: boolean,
hot: boolean,
bundler?: string
}) => {
const { dev } = await import('./cli/dev');
dev(opts);
});