omi/packages/omiu/examples
dntzhang 93b06f74fe update doc of omiu 2019-03-13 17:14:20 +08:00
..
build update doc of omiu 2019-03-13 17:14:20 +08:00
config omiu - add md2site 2018-12-28 09:55:26 +08:00
public omiu - fix icon repl 2019-03-05 11:33:43 +08:00
scripts omiu - add omiu example 2018-12-26 08:07:00 +08:00
src update doc of omiu 2019-03-13 17:14:20 +08:00
.eslintrc omiu - add omiu example 2018-12-26 08:07:00 +08:00
README.md update readme 2019-01-10 10:26:18 +08:00
gitignore omiu - add omiu example 2018-12-26 08:07:00 +08:00
package.json package.json back to the original state 2019-03-06 01:10:18 +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