mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-06 08:50:50 +08:00
chore: add monorepo tools (#9196)
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { Workspace } from '@affine-tools/utils/workspace';
|
||||
import { Cli } from 'clipanion';
|
||||
|
||||
import { BuildCommand } from './build';
|
||||
import { BundleCommand } from './bundle';
|
||||
import { CleanCommand } from './clean';
|
||||
import { CodegenCommand } from './codegen';
|
||||
import type { CliContext } from './context';
|
||||
import { DevCommand } from './dev';
|
||||
import { RunCommand } from './run';
|
||||
|
||||
const cli = new Cli<CliContext>({
|
||||
binaryName: 'affine',
|
||||
binaryVersion: '0.0.0',
|
||||
binaryLabel: 'AFFiNE Monorepo Tools',
|
||||
enableColors: true,
|
||||
enableCapture: true,
|
||||
});
|
||||
|
||||
cli.register(RunCommand);
|
||||
cli.register(CodegenCommand);
|
||||
cli.register(CleanCommand);
|
||||
cli.register(BuildCommand);
|
||||
cli.register(DevCommand);
|
||||
cli.register(BundleCommand);
|
||||
|
||||
await cli.runExit(process.argv.slice(2), {
|
||||
workspace: new Workspace(),
|
||||
stdin: process.stdin,
|
||||
stdout: process.stdout,
|
||||
stderr: process.stderr,
|
||||
});
|
||||
Reference in New Issue
Block a user