generator-orcaguife
v0.1.12
Published
For setting up **Orca UI FE** project quickly. For others projects, you can also use it if like.
Downloads
6
Readme
Orca UI FE yeoman generator
For setting up Orca UI FE project quickly. For others projects, you can also use it if like.
Encapsulated from create-react-app with a lot of custom modifications.
Usage:
Install yeoman:
$ npm i yeoman -g
Use this generator:
$ mkdir yourApp $ cd yourApp $ npm i generator-orcaguife -g $ yo orcaguife
How to modify this generator with your custom functionality and templates:
- Clone or download and unzip this project, and then modify it as you want, but remember to follow the yeoman-generator rules.
- Publish the modified copy as a new yeoman-generator node module to NPM platform with your own unique module name. Notice: Make sure that your NPM's registry is "https://registry.npmjs.org".
- If you just wanna keep the modified copy in your PC, just run
$ npm link
under the root folder of it. - Run the shell commands of previous step 2 .
Wanna integrate generator into other GUI tools(not terminal like), check yeoman-environment.
The main versions of dependencies of this ancient CRA we use:
webpack
3.8.1
webpack-dev-server
2.9.4
babel-core
6.26.0
react
16.2.0
Significant changes since version 16.3.redux
3.7.2
react-redux
5.0.5
react-router
4.2.0
A truly dynamic, component-based router.antd
3.12.4
Don't forget the 2018 Christmas Egg.We will do the upgrade if we have the time, or handle it by yourself :).
The configurations and features we modified and introduced to the raw CRA for
webpack
andbabel
are as below:- Introduce
less-loader
to handle less files. - Introduce
HappyPack
to change the compiling ways of some types of files, and optimize compiling speed. - Introduce reverse proxy server configuration when running
dev
environment, usage:$ npm run start -- --rp http:// 192.168.100.100
. So do not need to set itpakage.json
which way you will modify the code frequently. - Introduce module import as required for
antd
, change some configurations in.babelrc
. - Introduce
transform-decorators-legacy
plugins in.babelrc
for the decorator syntax for EcmaScript. If you upgrade yourbabel
version to 7.X, there's another plugin instead. - Introduce
stage-2
preset in.babelrc
for some new syntax of EcmaScript. - Some other little changes, etc.
- Introduce