feat(cli): auto install all components

This commit is contained in:
陈嘉涵
2019-11-27 11:45:35 +08:00
parent fac1a85c87
commit e4f934dfde
13 changed files with 46 additions and 23 deletions

View File

@@ -3,8 +3,9 @@ import WebpackDevServer from 'webpack-dev-server';
import { getPort } from 'portfinder';
import { clean } from '../commands/clean';
import { siteDevConfig } from '../config/webpack.site.dev';
import { genMobileConfig } from '../compiler/gen-mobile-config';
import { genDesktopConfig } from '../compiler/gen-desktop-config';
import { genPackageEntry } from '../compiler/gen-package-entry';
import { genMobileEntry } from '../compiler/gen-mobile-entry';
import { genDesktopEntry } from '../compiler/gen-desktop-entry';
function runWebpack() {
const server = new WebpackDevServer(
@@ -33,7 +34,8 @@ function runWebpack() {
export function dev() {
clean();
genMobileConfig();
genDesktopConfig();
genPackageEntry();
genMobileEntry();
genDesktopEntry();
runWebpack();
}