Skip to content

Commit f89de6d

Browse files
committed
chore: 发布测试
1 parent 5670cba commit f89de6d

File tree

3 files changed

+73
-81
lines changed

3 files changed

+73
-81
lines changed

docs/guide.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,38 @@
1-
This is a guide example.
1+
## 安装
2+
3+
npm
4+
5+
```shell
6+
npm install @tool-pack/react-ui --save
7+
```
8+
9+
pnpm
10+
11+
```shell
12+
pnpm add @tool-pack/react-ui -S
13+
```
14+
15+
yarn
16+
17+
```shell
18+
yarn add @tool-pack/react-ui -S
19+
```
20+
21+
## 使用
22+
23+
```typescript jsx
24+
import React from 'react';
25+
import { Button, Space } from '@tool-pack/react-ui';
26+
import '@tool-pack/react-ui/dist/index.css';
27+
28+
const App: React.FC = () => (
29+
<Space>
30+
<Button size="small">small</Button>
31+
<Button>default</Button>
32+
<Button size="medium">medium</Button>
33+
<Button size="large">large</Button>
34+
</Space>
35+
);
36+
37+
export default App;
38+
```

packages/react-ui/README.md

Lines changed: 29 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,40 @@
1-
# react-starter
1+
# @tool-pack/react-ui
22

3-
react template starter
3+
## 安装
44

5-
## 已添加的功能
5+
npm
66

7-
- [x] react
8-
- [x] typescript
9-
- [x] jest
10-
- [x] eslint
11-
- [x] eslint 推荐规则
12-
- [x] typescript 推荐规则
13-
- [x] prettier 推荐规则
14-
- [x] react 推荐规则
15-
- [x] prettier
16-
- [x] commit-lint
7+
```shell
8+
npm install @tool-pack/react-ui --save
9+
```
1710

18-
# Getting Started with Create React App
11+
pnpm
1912

20-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
13+
```shell
14+
pnpm add @tool-pack/react-ui -S
15+
```
2116

22-
## Available Scripts
17+
yarn
2318

24-
In the project directory, you can run:
19+
```shell
20+
yarn add @tool-pack/react-ui -S
21+
```
2522

26-
### `npm start`
23+
## 使用
2724

28-
Runs the app in the development mode.\
29-
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
25+
```typescript jsx
26+
import React from 'react';
27+
import { Button, Space } from '@tool-pack/react-ui';
28+
import '@tool-pack/react-ui/dist/index.css';
3029

31-
The page will reload when you make changes.\
32-
You may also see any lint errors in the console.
30+
const App: React.FC = () => (
31+
<Space>
32+
<Button size="small">small</Button>
33+
<Button>default</Button>
34+
<Button size="medium">medium</Button>
35+
<Button size="large">large</Button>
36+
</Space>
37+
);
3338

34-
### `npm test`
35-
36-
Launches the test runner in the interactive watch mode.\
37-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
38-
39-
### `npm run build`
40-
41-
Builds the app for production to the `build` folder.\
42-
It correctly bundles React in production mode and optimizes the build for the best performance.
43-
44-
The build is minified and the filenames include the hashes.\
45-
Your app is ready to be deployed!
46-
47-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
48-
49-
### `npm run eject`
50-
51-
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
52-
53-
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
54-
55-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
56-
57-
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
58-
59-
## Learn More
60-
61-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
62-
63-
To learn React, check out the [React documentation](https://reactjs.org/).
64-
65-
### Code Splitting
66-
67-
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
68-
69-
### Analyzing the Bundle Size
70-
71-
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
72-
73-
### Making a Progressive Web App
74-
75-
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
76-
77-
### Advanced Configuration
78-
79-
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
80-
81-
### Deployment
82-
83-
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
84-
85-
### `npm run build` fails to minify
86-
87-
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
39+
export default App;
40+
```

packages/react-ui/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
{
22
"name": "@tool-pack/react-ui",
3-
"version": "0.0.0-beta.1",
3+
"version": "0.0.1",
44
"sideEffects": false,
55
"scripts": {
66
"rm:dist": "rimraf ./dist",
7-
"build:vite": "vite build && npm run build:dts",
7+
"build": "npm run build:vite && npm run build:dts && npm run build:scss",
8+
"build:vite": "vite build",
89
"build:scss": "sass src/index.scss dist/index.css --no-source-map",
910
"check:ts": "tsc --noEmit -p tsconfig.json",
1011
"alias:debug": "tsc-alias -p tsconfig.json --debug",
1112
"build:dts": "tsc -p ./tsconfig.json --emitDeclarationOnly && tsc-alias -p ./tsconfig.json && rollup -c ./rollup.dts.config.js",
12-
"yalc:publish": "yalc publish"
13+
"yalc:publish": "yalc publish",
14+
"pub": "npm publish"
1315
},
1416
"types": "dist/index.d.ts",
1517
"main": "dist/index.cjs.js",
1618
"module": "dist/index.es.js",
1719
"unpkg": "dist/index.iife.js",
18-
"jsdelivr": "dist/index.iife.j",
20+
"jsdelivr": "dist/index.iife.js",
1921
"exports": {
2022
".": {
2123
"import": {

0 commit comments

Comments
 (0)