mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
35 lines
759 B
TypeScript
35 lines
759 B
TypeScript
import type { PackageName } from '@affine-tools/utils/workspace';
|
|
|
|
import { Option, PackageSelectorCommand } from './command';
|
|
|
|
export class DevCommand extends PackageSelectorCommand {
|
|
static override paths = [['dev'], ['d']];
|
|
|
|
protected override availablePackages: PackageName[] = [
|
|
'@affine/web',
|
|
'@affine/server',
|
|
'@affine/electron',
|
|
'@affine/electron-renderer',
|
|
'@affine/mobile',
|
|
'@affine/ios',
|
|
'@affine/android',
|
|
];
|
|
|
|
protected deps = Option.Boolean('--deps', {
|
|
description: 'Run dev with dependencies',
|
|
});
|
|
|
|
async execute() {
|
|
const name = await this.getPackage();
|
|
const args = [];
|
|
|
|
if (this.deps) {
|
|
args.push('--deps');
|
|
}
|
|
|
|
args.push(name, 'dev');
|
|
|
|
await this.cli.run(args);
|
|
}
|
|
}
|