update readme
This commit is contained in:
parent
4472253472
commit
36c694c14b
21
README.CN.md
21
README.CN.md
|
@ -448,18 +448,25 @@ $ npm run build # 编译发布
|
|||
...
|
||||
```
|
||||
|
||||
#### 切换 omi 和 omio
|
||||
#### 切换 omi, omio 和 reomio
|
||||
|
||||
增加或删除 package.json 里的 alias config 可以切换 omi 和 omio 渲染:
|
||||
|
||||
```js
|
||||
...
|
||||
"alias": {
|
||||
"omi": "omio"
|
||||
}
|
||||
...
|
||||
"alias": {
|
||||
"omi": "omio"
|
||||
}
|
||||
```
|
||||
|
||||
使用 reomio:
|
||||
|
||||
```js
|
||||
"alias": {
|
||||
"omi": "reomio",
|
||||
"react": "reomio",
|
||||
"react-dom": "reomio"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
<!-- 关于编译网站的 url 前缀的设置,可以参考两个地址:
|
||||
|
||||
|
|
20
README.md
20
README.md
|
@ -433,16 +433,24 @@ You can set up the PUBLIC_URL, such as:
|
|||
...
|
||||
```
|
||||
|
||||
#### Switch omi and omio
|
||||
#### Switch omi, omio and reomio
|
||||
|
||||
Add or remove the alias config in package.json to switch omi and omio:
|
||||
|
||||
```js
|
||||
...
|
||||
"alias": {
|
||||
"omi": "omio"
|
||||
}
|
||||
...
|
||||
"alias": {
|
||||
"omi": "omio"
|
||||
}
|
||||
```
|
||||
|
||||
Using reomio:
|
||||
|
||||
```js
|
||||
"alias": {
|
||||
"omi": "reomio",
|
||||
"react": "reomio",
|
||||
"react-dom": "reomio"
|
||||
}
|
||||
```
|
||||
|
||||
<!-- About compiled website URL:
|
||||
|
|
|
@ -29,42 +29,34 @@ Directory description:
|
|||
| **Template Type**| **Command**| **Describe**|
|
||||
| ------------ | -----------| ----------------- |
|
||||
|Base Template(v3.3.0+)|`omi init my-app`| Basic omi or omio(IE8+) project template.|
|
||||
|TypeScript Template(omi-cli v3.3.0+)|`omi init-ts my-app`|Basic template with typescript.|
|
||||
|小程序模板(v3.3.5+)|`omi init-p my-app`| Omi 开发小程序 |
|
||||
|基础模板(v3.3.9+)|`omi init-o my-app`| 支持 IE8 的基础模板,只是 build 的时候支持 IE8,开发调试请用 IE9|
|
||||
|Base Template with snapshoot|`omi init-snap my-app`| Basic omi or omio(IE8+) project template with snapshoot prerendering.|
|
||||
|TypeScript Template(omi-cli v3.3.0+)|`omi init-ts my-app`|Basic template with typescript.|
|
||||
|Mobile Template|`omi init-weui my-app`| Mobile web app template with weui and omi-router.|
|
||||
|omi-mp Template(omi-cli v3.0.13+)|`omi init-mp my-app` |Developing web with mini program template.|
|
||||
|MVVM Template(omi-cli v3.0.22+)|`omi init-mvvm my-app` |MVVM template.|
|
||||
<!-- |[SPA Template](https://tencent.github.io/omi/packages/omi-router/examples/spa/build/)(omi-cli v3.0.10+)|`omi init-spa my-app`|Single page application template with omi-router.| -->
|
||||
|
||||
CLI's auto-created project scaffolding is based on a single-page create-react-app to be converted into a multi-page one, with configuration issues to see [create-react-app user guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md)
|
||||
|
||||
## Switch omi, omio and reomio
|
||||
|
||||
About compiled website URL:
|
||||
Add or remove the alias config in package.json to switch omi and omio:
|
||||
|
||||
* [build env doc](https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#referencing-environment-variables-in-the-html)
|
||||
* [build problem](https://stackoverflow.com/questions/42686149/create-react-app-build-with-public-url)
|
||||
|
||||
Such as in windows:
|
||||
|
||||
```json
|
||||
"scripts": {
|
||||
"start": "node scripts/start.js",
|
||||
"_build": "node scripts/build.js",
|
||||
"build":"set PUBLIC_URL=https://fe.wxpay.oa.com/dv&& npm run _build"
|
||||
```js
|
||||
"alias": {
|
||||
"omi": "omio"
|
||||
}
|
||||
```
|
||||
|
||||
In mac os:
|
||||
Using reomio:
|
||||
|
||||
```json
|
||||
"scripts": {
|
||||
"start": "node scripts/start.js",
|
||||
"_build": "node scripts/build.js",
|
||||
"build":"PUBLIC_URL=https://fe.wxpay.oa.com/dv npm run _build",
|
||||
"fix": "eslint src --fix"
|
||||
},
|
||||
```js
|
||||
"alias": {
|
||||
"omi": "reomio",
|
||||
"react": "reomio",
|
||||
"react-dom": "reomio"
|
||||
}
|
||||
```
|
||||
|
||||
# License
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "omi-cli",
|
||||
"version": "3.3.11",
|
||||
"version": "3.3.12",
|
||||
"description": "Create website, app with no build configuration. be friendly to [Omi](https://github.com/Tencent/omi) framework.",
|
||||
"main": "bin/omi",
|
||||
"engines": {
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
"jest-watch-typeahead": "0.3.0",
|
||||
"mini-css-extract-plugin": "0.5.0",
|
||||
"omi": "latest",
|
||||
"omio": "latest",
|
||||
"optimize-css-assets-webpack-plugin": "5.0.1",
|
||||
"pnp-webpack-plugin": "1.2.1",
|
||||
"postcss-flexbugs-fixes": "4.1.0",
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
"promise": "8.0.1",
|
||||
"raf": "3.4.0",
|
||||
"react-dev-utils": "^7.0.1",
|
||||
"reomio": "latest",
|
||||
"resolve": "1.6.0",
|
||||
"style-loader": "0.19.0",
|
||||
"sw-precache-webpack-plugin": "^0.11.5",
|
||||
|
|
Loading…
Reference in New Issue