Skip to content

Commit

Permalink
feat: use pkg-plugin-dev to preview components (#104)
Browse files Browse the repository at this point in the history
* feat: update template-pkg-monorepo-node

* feat: update
  • Loading branch information
luhc228 authored Feb 28, 2024
1 parent ba2be09 commit 080aa91
Show file tree
Hide file tree
Showing 70 changed files with 284 additions and 459 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,15 @@
"version": "0.0.0",
"private": true,
"scripts": {
"start": "pnpm packages:start & pnpm docs:start",
"build": "pnpm packages:build && pnpm docs:build",
"packages:start": "pnpm --parallel -r run start",
"packages:build": "pnpm -r run build",
"docs:start": "ice-pkg start",
"docs:build": "ice-pkg build",
"start": "pnpm --parallel -r run start",
"build": "pnpm -r run build",
"eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx ./",
"eslint:fix": "pnpm eslint --fix"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^2.3.1",
"@docusaurus/theme-classic": "^2.3.1",
"@ice/pkg": "^1.5.0",
"@ice/pkg-plugin-docusaurus": "^1.4.3",
"@applint/spec": "^1.0.0",
"@tsconfig/docusaurus": "^1.0.6",
"@types/react": "^18.0.28",
"clsx": "^1.2.1",
"eslint": "^8.0.0",
"lib-a": "workspace:*",
"lib-b": "workspace:*",
"lib-c": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^4.1.2"
},
"packageManager": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# lib-c
# common

组件功能描述

## Install

```bash
$ npm i lib-c --save
$ npm i common --save
```

## Usage

```js
import LibC from 'lib-c';
import { add } from 'common';
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "lib-c",
"name": "common",
"version": "0.1.0",
"description": "组件功能描述",
"files": [
Expand Down Expand Up @@ -47,4 +47,4 @@
"access": "public"
},
"license": "MIT"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function add(a: number, b: number) {
return a + b;
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"library"
],
"dependencies": {
"@swc/helpers": "^0.5.1"
"@swc/helpers": "^0.5.1",
"common": "workspace:^"
},
"devDependencies": {
"@ice/pkg": "^1.0.0",
Expand All @@ -47,4 +48,4 @@
"access": "public"
},
"license": "MIT"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export function foo(options: any) {
console.log('options');
return true;
import { add } from 'common';

export function main() {
console.log(add(1, 2));
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"library"
],
"dependencies": {
"@swc/helpers": "^0.5.1"
"@swc/helpers": "^0.5.1",
"common": "workspace:^"
},
"devDependencies": {
"@ice/pkg": "^1.0.0",
Expand All @@ -47,4 +48,4 @@
"access": "public"
},
"license": "MIT"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export function foo(options: any) {
console.log('options');
return true;
import { add } from 'common';

export function main() {
console.log(add(3, 4));
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 4 additions & 0 deletions packages/template-pkg-monorepo-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.1.0

- [feat] use `@ali/pkg-plugin-dev` instead of `@ice/pkg-plugin-docusaurus` internal

## 1.0.11

- [fix] 修复生成文档目录时包含其他非 `docs` 目录下文档问题
Expand Down
5 changes: 2 additions & 3 deletions packages/template-pkg-monorepo-react/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"name": "@ice/template-pkg-monorepo-react",
"version": "1.0.11",
"version": "1.1.0",
"files": [
"template",
"!template/component/.docusaurus",
"!template/component/build",
"!template/component/pnpm-lock.yaml",
"!template/**/node_modules",
Expand All @@ -30,4 +29,4 @@
"materialConfig": {
"type": "react"
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
"version": "0.0.0",
"private": true,
"scripts": {
"start": "pnpm packages:start & pnpm docs:start",
"build": "pnpm packages:build && pnpm docs:build",
"packages:start": "pnpm --parallel -r run start",
"packages:build": "pnpm -r run build",
"docs:start": "ice-pkg start",
"docs:build": "ice-pkg build",
"start": "pnpm --parallel -r run start",
"build": "pnpm -r run build",
"eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx ./",
"eslint:fix": "pnpm eslint --fix",
"stylelint": "stylelint \"**/*.{css,scss,less}\"",
Expand All @@ -17,16 +13,8 @@
"lint:fix": "pnpm eslint:fix && pnpm stylelint:fix"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^2.3.1",
"@docusaurus/theme-classic": "^2.3.1",
"@ice/pkg": "^1.5.0",
"@ice/pkg-plugin-docusaurus": "^1.4.3",
"@applint/spec": "^1.0.0",
"@tsconfig/docusaurus": "^1.0.6",
"clsx": "^1.2.1",
"component-a": "workspace:*",
"component-b": "workspace:*",
"component-c": "workspace:*",
"eslint": "^8.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# header

组件功能描述

## Install

```bash
$ npm i header --save
```

## Usage

```jsx
import Header from 'header';
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { defineConfig } from '@ice/pkg';

// https://pkg.ice.work/reference/config/
export default defineConfig({
});
export default defineConfig({});
Loading

0 comments on commit 080aa91

Please sign in to comment.