refactor(infra): remove old plugin system (#5411)

plugin system need redesign
This commit is contained in:
EYHN
2023-12-27 02:49:59 +00:00
parent 3903a1c1d6
commit 265ee81666
110 changed files with 46 additions and 4426 deletions
-5
View File
@@ -23,14 +23,9 @@
"main": "./dist/main.js",
"devDependencies": {
"@affine-test/kit": "workspace:*",
"@affine/copilot-plugin": "workspace:*",
"@affine/env": "workspace:*",
"@affine/hello-world-plugin": "workspace:*",
"@affine/image-preview-plugin": "workspace:*",
"@affine/native": "workspace:*",
"@affine/sdk": "workspace:*",
"@affine/templates": "workspace:*",
"@affine/vue-hello-world-plugin": "workspace:*",
"@blocksuite/blocks": "0.11.0-nightly-202312220916-e3abcbb",
"@blocksuite/lit": "0.11.0-nightly-202312220916-e3abcbb",
"@blocksuite/presets": "0.11.0-nightly-202312220916-e3abcbb",
+1 -8
View File
@@ -7,14 +7,7 @@
"targets": {
"build": {
"executor": "nx:run-script",
"dependsOn": [
{
"projects": ["tag:plugin"],
"target": "build",
"params": "ignore"
},
"^build"
],
"dependsOn": ["^build"],
"options": {
"script": "build"
},
+1 -8
View File
@@ -28,14 +28,7 @@ export const config = (): BuildOptions => {
bundle: true,
target: `node${NODE_MAJOR_VERSION}`,
platform: 'node',
external: [
'electron',
'electron-updater',
'@toeverything/plugin-infra',
'yjs',
'semver',
'tinykeys',
],
external: ['electron', 'electron-updater', 'yjs', 'semver', 'tinykeys'],
format: 'cjs',
loader: {
'.node': 'copy',
@@ -43,14 +43,6 @@ const cwd = repoRootDir;
const { SKIP_NX_CACHE } = process.env;
const nxFlag = SKIP_NX_CACHE ? '--skip-nx-cache' : '';
if (!process.env.SKIP_PLUGIN_BUILD) {
spawnSync('yarn', ['build:plugins'], {
stdio: 'inherit',
env: process.env,
cwd,
});
}
// step 1: build web dist
if (!process.env.SKIP_WEB_BUILD) {
spawnSync('yarn', ['nx', 'build', '@affine/core', nxFlag], {
-3
View File
@@ -22,9 +22,6 @@
{
"path": "../../common/infra"
},
{
"path": "../../common/sdk"
},
{
"path": "../../common/env"
},
@@ -12,11 +12,7 @@
"types": ["node"],
"allowJs": true
},
"include": [
"./scripts",
"esbuild.main.config.ts",
"esbuild.plugin.config.ts"
],
"include": ["./scripts"],
"ts-node": {
"esm": true,
"experimentalSpecifierResolution": "node"