mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
Revert "chore(cli): build infra (#3375)"
This reverts commit 635ca081e4.
This commit is contained in:
@@ -4,7 +4,6 @@ import path from 'node:path';
|
||||
import type { BuildFlags } from '../config/index.js';
|
||||
import { projectRoot } from '../config/index.js';
|
||||
import { buildI18N } from '../util/i18n.js';
|
||||
import { buildInfra } from '../util/infra.js';
|
||||
|
||||
const cwd = path.resolve(projectRoot, 'apps', 'core');
|
||||
|
||||
@@ -46,7 +45,6 @@ const flags = {
|
||||
} satisfies BuildFlags;
|
||||
|
||||
buildI18N();
|
||||
await buildInfra();
|
||||
spawn(
|
||||
'node',
|
||||
[
|
||||
|
||||
@@ -7,7 +7,6 @@ import { config } from 'dotenv';
|
||||
|
||||
import { type BuildFlags, projectRoot } from '../config/index.js';
|
||||
import { watchI18N } from '../util/i18n.js';
|
||||
import { watchInfra } from '../util/infra.js';
|
||||
|
||||
const files = ['.env', '.env.local'];
|
||||
|
||||
@@ -94,7 +93,6 @@ flags.channel = buildFlags.channel as any;
|
||||
flags.coverage = buildFlags.coverage;
|
||||
|
||||
watchI18N();
|
||||
await watchInfra();
|
||||
spawn(
|
||||
'node',
|
||||
[
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
import { resolve } from 'node:path';
|
||||
|
||||
import { build } from 'vite';
|
||||
|
||||
import { projectRoot } from '../config/index.js';
|
||||
|
||||
const infraFilePath = resolve(
|
||||
projectRoot,
|
||||
'packages',
|
||||
'infra',
|
||||
'vite.config.ts'
|
||||
);
|
||||
const pluginInfraFilePath = resolve(
|
||||
projectRoot,
|
||||
'packages',
|
||||
'plugin-infra',
|
||||
'vite.config.ts'
|
||||
);
|
||||
|
||||
export const buildInfra = async () => {
|
||||
await build({
|
||||
configFile: infraFilePath,
|
||||
});
|
||||
await build({
|
||||
configFile: pluginInfraFilePath,
|
||||
});
|
||||
};
|
||||
|
||||
export const watchInfra = async () => {
|
||||
await build({
|
||||
configFile: infraFilePath,
|
||||
build: {
|
||||
watch: {},
|
||||
},
|
||||
});
|
||||
await build({
|
||||
configFile: pluginInfraFilePath,
|
||||
build: {
|
||||
watch: {},
|
||||
},
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user