Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(workspace): Remove circular dependencies between plugins #5

Merged
merged 1 commit into from
Dec 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

## Demo

- [Univer Demo](dream-num.github.io/univer-demo/)
- [Univer Demo](https://dream-num.github.io/univer-demo/)

## 开发

Expand All @@ -33,7 +33,7 @@ pnpm i
启动 sheets

```
npm run dev
npm run dev:sheet
```

启动 docs
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ English | [简体中文](./README-zh.md)

## Demo

- [Univer Demo](dream-num.github.io/univer-demo/)
- [Univer Demo](https://dream-num.github.io/univer-demo/)

## Development

Expand All @@ -33,7 +33,7 @@ pnpm i
Start sheets

```
npm run dev
npm run dev:sheet
```

Start docs
Expand Down
2 changes: 1 addition & 1 deletion examples/univer-sheet-ts/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const uiDefaultConfigDemo = {
// const univerSheetDemo = UniverSheet.newInstance(DEFAULT_WORKBOOK_DATA_DEMO1);
// const univerSheetDemo = UniverSheet.newInstance(DEFAULT_WORKBOOK_DATA_DEMO2);
// const univerSheetDemo = UniverSheet.newInstance(DEFAULT_WORKBOOK_DATA_DEMO3);
const univerSheetDemo = UniverSheet.newInstance(DEFAULT_WORKBOOK_DATA_DEMO3);
const univerSheetDemo = UniverSheet.newInstance(DEFAULT_WORKBOOK_DATA_DEMO);
univerSheetDemo.installPlugin(new RenderEngine());
univerSheetDemo.installPlugin(new UniverComponentSheet());
univerSheetDemo.installPlugin(new SheetPlugin(uiDefaultConfigDemo));
Expand Down
17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,16 @@
"test:ui": "pnpm run --filter @univer/style-universheet test",
"test:e2e": "pnpm run --filter @univer/base-sheets test:play",
"dev": "node scripts/dev",
"dev:demo": "pnpm run --filter univer-sheet-ts dev",
"dev:demosheet": "pnpm run --filter univer-sheet-ts dev",
"dev:demodoc": "pnpm run --filter univer-doc-ts dev",
"dev:demoslide": "pnpm run --filter univer-slide-ts dev",
"dev:doc": "pnpm run --filter @univer/base-docs dev",
"dev:slide": "pnpm run --filter @univer/base-slides dev",
"d": "pnpm run --filter univer-vanilla-ts dev",
"dev:sheet": "pnpm run --filter univer-sheet-ts dev",
"dev:doc": "pnpm run --filter univer-doc-ts dev",
"dev:slide": "pnpm run --filter univer-slide-ts dev",
"dev:all": "pnpm run --filter univer-vanilla-ts dev",
"api": "node scripts/api",
"lighthouse-dev": "start /B node scripts/dev && lighthouse http:https://127.0.0.1:3103 --output html --output-path ./report.html",
"build": "node scripts/build.js",
"build:demosheet": "pnpm run --filter univer-sheet-ts build:demo",
"build:demodoc": "pnpm run --filter univer-doc-ts build:demo",
"build:demoslide": "pnpm run --filter univer-slide-ts build:demo",
"build:sheet": "pnpm run --filter univer-sheet-ts build:demo",
"build:doc": "pnpm run --filter univer-doc-ts build:demo",
"build:slide": "pnpm run --filter univer-slide-ts build:demo",
"link": "node scripts/link.js",
"build:customd": "cd cli/src/templates/univer-custom-build && npm run build:d",
"clean": "npm cache clean --force && pnpm dlx rimraf node_modules **/node_modules/ package-lock.json yarn.lock pnpm-lock.yaml && pnpm install && pnpm dlx playwright install",
Expand Down
1 change: 0 additions & 1 deletion packages/base-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"css-vars-ponyfill": "^2.4.6",
"preact": "^10.5.14"
Expand Down
3 changes: 0 additions & 3 deletions packages/base-formula-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@
"vite": "^2.4.4"
},
"dependencies": {
"@univer/base-formula-engine": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"nanoid": "4.0.0",
"preact": "^10.5.14"
Expand Down
6 changes: 1 addition & 5 deletions packages/base-numfmt-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@
"vite-plugin-external": "1.2.3"
},
"dependencies": {
"@univer/base-numfmt-engine": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1"
"@univer/core": "workspace:^0.0.1"
}
}
2 changes: 0 additions & 2 deletions packages/base-sheets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
"@univer/base-render": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-formula": "workspace:^0.0.1",
"@univer/sheets-plugin-numfmt": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"css-vars-ponyfill": "^2.4.6",
"nanoid": "4.0.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/base-sheets/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { UniverSheet } from '@univer/core';
import { RenderEngine } from '@univer/base-render';
import { UniverComponentSheet } from '@univer/style-universheet';
import { NumfmtPlugin } from '@univer/sheets-plugin-numfmt';
// import { NumfmtPlugin } from '@univer/sheets-plugin-numfmt';
import { DEFAULT_WORKBOOK_DATA } from '@univer/common-plugin-data';
import { DEFAULT_FORMULA_DATA, FormulaPlugin } from '@univer/sheets-plugin-formula';
// import { DEFAULT_FORMULA_DATA, FormulaPlugin } from '@univer/sheets-plugin-formula';
import { SheetPlugin } from './SheetPlugin';

const uiDefaultConfigUp = {
Expand Down Expand Up @@ -44,8 +44,8 @@ univerSheetUp.installPlugin(new UniverComponentSheet());
let sheetPlugin = new SheetPlugin(uiDefaultConfigUp);

univerSheetUp.installPlugin(sheetPlugin);
univerSheetUp.installPlugin(new NumfmtPlugin());
FormulaPlugin.create(DEFAULT_FORMULA_DATA).installTo(univerSheetUp);
// univerSheetUp.installPlugin(new NumfmtPlugin());
// FormulaPlugin.create(DEFAULT_FORMULA_DATA).installTo(univerSheetUp);

// univerSheetUp.refreshWorkbook(DEFAULT_WORKBOOK_DATA_DOWN);

Expand Down
1 change: 0 additions & 1 deletion packages/base-slides/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"css-vars-ponyfill": "^2.4.6",
"preact": "^10.5.14"
Expand Down
3 changes: 1 addition & 2 deletions packages/sheets-plugin-alternating-colors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@
"vite-plugin-external": "1.2.3"
},
"dependencies": {
"@univer/base-component": "workspace:^0.0.1",
"@univer/base-render": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/sheets-plugin-protection": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"preact": "^10.5.14"
}
Expand Down
1 change: 0 additions & 1 deletion packages/sheets-plugin-clipboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-conditional-format": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"nanoid": "^4.0.0",
"preact": "^10.5.14"
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets-plugin-comment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
"vite-plugin-external": "1.2.3"
},
"dependencies": {
"@univer/base-component": "workspace:^0.0.1",
"@univer/base-render": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"preact": "^10.5.14"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets-plugin-conditional-format/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"vite-plugin-external": "1.2.3"
},
"dependencies": {
"@univer/base-component": "workspace:^0.0.1",
"@univer/base-render": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"preact": "^10.5.14"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets-plugin-data-validation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"vite-plugin-external": "1.2.3"
},
"dependencies": {
"@univer/base-component": "workspace:^0.0.1",
"@univer/base-render": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"preact": "^10.5.14"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets-plugin-filter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
"vite-plugin-external": "1.2.3"
},
"dependencies": {
"@univer/base-component": "workspace:^0.0.1",
"@univer/base-render": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-conditional-format": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"nanoid": "^4.0.0",
"preact": "^10.5.14"
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets-plugin-find/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"vite-plugin-external": "1.2.3"
},
"dependencies": {
"@univer/base-component": "workspace:^0.0.1",
"@univer/base-render": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"preact": "^10.5.14"
}
Expand Down
1 change: 0 additions & 1 deletion packages/sheets-plugin-formula/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"css-vars-ponyfill": "^2.4.6",
"preact": "^10.5.14",
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets-plugin-freeze/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
"vite-plugin-external": "1.2.3"
},
"dependencies": {
"@univer/base-component": "workspace:^0.0.1",
"@univer/base-render": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"preact": "^10.5.14"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets-plugin-group/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
"vite": "^2.4.4"
},
"dependencies": {
"@univer/base-component": "workspace:^0.0.1",
"@univer/base-render": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"preact": "^10.5.14"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets-plugin-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"vite-plugin-external": "1.2.3"
},
"dependencies": {
"@univer/base-component": "workspace:^0.0.1",
"@univer/base-render": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"preact": "^10.5.14"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets-plugin-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"vite-plugin-external": "1.2.3"
},
"dependencies": {
"@univer/base-component": "workspace:^0.0.1",
"@univer/base-render": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"preact": "^10.5.14"
}
Expand Down
1 change: 1 addition & 0 deletions packages/sheets-plugin-numfmt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"preact": "^10.5.14"
}
}
2 changes: 1 addition & 1 deletion packages/sheets-plugin-pivot-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
"vite-plugin-external": "1.2.3"
},
"dependencies": {
"@univer/base-component": "workspace:^0.0.1",
"@univer/base-render": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"preact": "^10.5.14"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets-plugin-print/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
"vite-plugin-external": "1.2.3"
},
"dependencies": {
"@univer/base-component": "workspace:^0.0.1",
"@univer/base-render": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"preact": "^10.5.14"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets-plugin-protection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
"vite-plugin-external": "1.2.3"
},
"dependencies": {
"@univer/base-component": "workspace:^0.0.1",
"@univer/base-render": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"preact": "^10.5.14"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets-plugin-screenshot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"vite-plugin-external": "1.2.3"
},
"dependencies": {
"@univer/base-component": "workspace:^0.0.1",
"@univer/base-render": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"preact": "^10.5.14"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets-plugin-sort/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"vite-plugin-external": "1.2.3"
},
"dependencies": {
"@univer/base-component": "workspace:^0.0.1",
"@univer/base-render": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"preact": "^10.5.14"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets-plugin-split-column/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"vite-plugin-external": "1.2.3"
},
"dependencies": {
"@univer/base-component": "workspace:^0.0.1",
"@univer/base-render": "workspace:^0.0.1",
"@univer/base-sheets": "workspace:^0.0.1",
"@univer/common-plugin-data": "workspace:^0.0.1",
"@univer/core": "workspace:^0.0.1",
"@univer/sheets-plugin-filter": "workspace:^0.0.1",
"@univer/style-universheet": "workspace:^0.0.1",
"preact": "^10.5.14"
}
Expand Down