omi/components/docs-src
Perry Chen ae1345961f
Merge branch 'Tencent:master' into master
2021-08-23 23:21:26 +08:00
..
config docs: init omiu docs 2020-04-15 11:02:08 +08:00
public docs: update omiu docs style && build omiu docs 2020-04-15 11:19:44 +08:00
scripts docs: init omiu docs 2020-04-15 11:02:08 +08:00
src Merge branch 'Tencent:master' into master 2021-08-23 23:21:26 +08:00
.eslintrc docs: init omiu docs 2020-04-15 11:02:08 +08:00
.gitignore docs: init omiu docs 2020-04-15 11:02:08 +08:00
README.md docs: init omiu docs 2020-04-15 11:02:08 +08:00
package.json docs: init omiu docs 2020-04-15 11:02:08 +08:00

README.md

Develop

npm install
npm start

Release

npm run build

Eslint + Prettier

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 compilerwill build to admin.html
│  └─ index.js    //Entry js of compilerwill build to index.html

Build

About compiled website URL

Such as in windows:

"scripts": {
  "start": "node scripts/start.js",
  "_build": "node scripts/build.js",
  "build":"set PUBLIC_URL=https://fe.wxpay.oa.com/dv&& npm run _build"
}

In mac os:

"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"
  },

If you only want to use relative addresses:

"build":"set PUBLIC_URL=.&& npm run _build"  //windows
"build":"PUBLIC_URL=. npm run _build",       //mac os

Docs

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