Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add saber eject-theme command #259

Merged
merged 14 commits into from
Aug 19, 2019
Prev Previous commit
Next Next commit
upgrade from master
krmax44 committed Jul 28, 2019
commit e6141fc2d7bbbfe3551c88b8d415839fd3c23a3c
1 change: 1 addition & 0 deletions packages/saber/lib/cli-commands/build.js
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ module.exports = function(cli) {
)
.alias('generate')
.option('--skip-compilation', 'Skip the webpack compilation process')
.option('--inspect-webpack', 'Inspect webpack config in your editor')
.action((cwd = '.', options) => {
setNodeEnv('production')

8 changes: 6 additions & 2 deletions packages/saber/lib/cli-commands/dev.js
Original file line number Diff line number Diff line change
@@ -9,17 +9,21 @@ module.exports = function(cli) {
.option('--lazy', 'Enable lazy page compilation')
.option('--port <port>', 'Server port', { default: 3000 })
.option('--host <host>', 'Server host', { default: '0.0.0.0' })
.option('--ssr', 'Enable server-side rendering')
.option('--inspect-webpack', 'Inspect webpack config in your editor')
.action((cwd = '.', options) => {
setNodeEnv('development')

const { host, port, lazy } = options
const { host, port, lazy, ssr } = options
delete options.host
delete options.port
delete options.lazy
delete options.ssr
return require('..')(Object.assign({ cwd, dev: true }, options), {
server: {
host,
port
port,
ssr
},
build: {
lazy