docs: update readme
This commit is contained in:
parent
e95635f3c4
commit
5dc695a42d
|
@ -1,67 +1,6 @@
|
|||
## Develop
|
||||
## Preact + Omis + Preact-CSS Snake Demo
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
## Release
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
## Eslint + Prettier
|
||||
|
||||
``` bash
|
||||
npm run fix
|
||||
```
|
||||
|
||||
## Directory description
|
||||
|
||||
```
|
||||
├─ config
|
||||
├─ public
|
||||
├─ scripts
|
||||
├─ src
|
||||
│ ├─ assets
|
||||
│ ├─ elements //Store all custom elements
|
||||
│ ├─ store //Store all this store of pages
|
||||
│ ├─ admin.js //Entry js of compiler,will build to admin.html
|
||||
│ └─ index.js //Entry js of compiler,will build to index.html
|
||||
```
|
||||
|
||||
## Build Scripts
|
||||
|
||||
```json
|
||||
"scripts": {
|
||||
"start": "node scripts/start.js",
|
||||
"build": "PUBLIC_URL=. node scripts/build.js",
|
||||
"build-windows": "set PUBLIC_URL=.&& node scripts/build.js",
|
||||
"fix": "eslint src --fix"
|
||||
}
|
||||
```
|
||||
|
||||
You can set up the PUBLIC_URL, such as:
|
||||
|
||||
```bash
|
||||
...
|
||||
"build": "PUBLIC_URL=https://fe.wxpay.oa.com/dv node scripts/build.js",
|
||||
"build-windows": "set PUBLIC_URL=https://fe.wxpay.oa.com/dv&& node scripts/build.js",
|
||||
...
|
||||
```
|
||||
|
||||
## Switch omi and omio
|
||||
|
||||
Add or remove the alias config in package.json to switch omi and omio:
|
||||
|
||||
```js
|
||||
...
|
||||
"alias": {
|
||||
"omi": "omio"
|
||||
}
|
||||
...
|
||||
```
|
||||
![](https://github.com/Tencent/omi/raw/master/assets/snake.jpg)
|
||||
|
||||
## License
|
||||
|
||||
|
|
Loading…
Reference in New Issue