Skip to content

Commit f94d18e

Browse files
committed
feat: update template-pkg-monorepo-node
1 parent ba2be09 commit f94d18e

File tree

17 files changed

+24
-162
lines changed

17 files changed

+24
-162
lines changed

packages/template-pkg-monorepo-node/template/component/build.config.mts

Lines changed: 0 additions & 37 deletions
This file was deleted.

packages/template-pkg-monorepo-node/template/component/package.json

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,15 @@
33
"version": "0.0.0",
44
"private": true,
55
"scripts": {
6-
"start": "pnpm packages:start & pnpm docs:start",
7-
"build": "pnpm packages:build && pnpm docs:build",
8-
"packages:start": "pnpm --parallel -r run start",
9-
"packages:build": "pnpm -r run build",
10-
"docs:start": "ice-pkg start",
11-
"docs:build": "ice-pkg build",
6+
"start": "pnpm --parallel -r run start",
7+
"build": "pnpm -r run build",
128
"eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx ./",
139
"eslint:fix": "pnpm eslint --fix"
1410
},
1511
"devDependencies": {
16-
"@docusaurus/module-type-aliases": "^2.3.1",
17-
"@docusaurus/theme-classic": "^2.3.1",
1812
"@ice/pkg": "^1.5.0",
19-
"@ice/pkg-plugin-docusaurus": "^1.4.3",
2013
"@applint/spec": "^1.0.0",
21-
"@tsconfig/docusaurus": "^1.0.6",
22-
"@types/react": "^18.0.28",
23-
"clsx": "^1.2.1",
2414
"eslint": "^8.0.0",
25-
"lib-a": "workspace:*",
26-
"lib-b": "workspace:*",
27-
"lib-c": "workspace:*",
28-
"react": "^18.2.0",
29-
"react-dom": "^18.2.0",
3015
"rimraf": "^4.1.2"
3116
},
3217
"packageManager": "[email protected]"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# lib-c
1+
# common
22

33
组件功能描述
44

55
## Install
66

77
```bash
8-
$ npm i lib-c --save
8+
$ npm i common --save
99
```
1010

1111
## Usage
1212

1313
```js
14-
import LibC from 'lib-c';
14+
import { add } from 'common';
1515
```
File renamed without changes.

packages/template-pkg-monorepo-node/template/component/packages/lib-c/package.json renamed to packages/template-pkg-monorepo-node/template/component/packages/common/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "lib-c",
2+
"name": "common",
33
"version": "0.1.0",
44
"description": "组件功能描述",
55
"files": [
@@ -47,4 +47,4 @@
4747
"access": "public"
4848
},
4949
"license": "MIT"
50-
}
50+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export function add(a: number, b: number) {
2+
return a + b;
3+
}
File renamed without changes.

packages/template-pkg-monorepo-node/template/component/packages/lib-a/docs/index.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/template-pkg-monorepo-node/template/component/packages/lib-a/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"library"
3838
],
3939
"dependencies": {
40-
"@swc/helpers": "^0.5.1"
40+
"@swc/helpers": "^0.5.1",
41+
"common": "workspace:^"
4142
},
4243
"devDependencies": {
4344
"@ice/pkg": "^1.0.0",
@@ -47,4 +48,4 @@
4748
"access": "public"
4849
},
4950
"license": "MIT"
50-
}
51+
}
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
export function foo(options: any) {
2-
console.log('options');
3-
return true;
1+
import { add } from 'common';
2+
3+
export function main() {
4+
console.log(add(1, 2));
45
}

0 commit comments

Comments
 (0)