diff --git a/libs/mf/src/server/mf-dev-server.ts b/libs/mf/src/server/mf-dev-server.ts index 08715b67..4630fd34 100644 --- a/libs/mf/src/server/mf-dev-server.ts +++ b/libs/mf/src/server/mf-dev-server.ts @@ -1,6 +1,7 @@ import { exec } from 'child_process'; import { isWorkspace, ProjectInfo, readProjectInfos } from './workspace'; import { print } from './colors'; +import { argv } from 'process'; let padding; @@ -18,7 +19,7 @@ function startCmd(name: string, cmd: string): void { function startApps(apps: ProjectInfo[]): void { for (const app of apps) { const cmd = `ng serve ${app.name} -o`; - print('DEVSVR', padding, app.name + ' ' + app.port); + print('DEVSVR', padding, app.name + ' ' + (app.port || '4200')); startCmd(app.name, cmd); } } @@ -28,8 +29,15 @@ if (!isWorkspace()) { process.exit(0); } +const [,, ...filter] = argv; +const startAll = filter.length === 0; + const projects = readProjectInfos(); -const apps = projects.filter(p => p.projectType === 'application'); +const apps = projects.filter(p => + p.projectType === 'application' + && !p.name.endsWith('-e2e') + && (startAll || filter.includes(p.name)) +); padding = apps.reduce((acc, p) => Math.max(acc, p.name.length), 0); padding = Math.max(6, padding) startApps(apps); \ No newline at end of file