CAP fund market
$ yarn dev
- React.js
- ant-design
- umi.js
- dva.js
- i18next
- ...
config/
: nginx related configs for docker imagedist/
: staging/production build files output pathmock/
: can mock api when developingpublic/
: files to be public accessedsrc/
: source code is heretests/
: ignore this
assets/
: photos, images, iconscomponents/
: general-purpose custom components, also include components fromant-design-pro
e2e/
: ignore thislayouts/
: layout files forpages/
,src/layouts/index.js
will be used for global layoutlocales/
: store locale file in.json
formatmodels/
: global states in the Redux store; support byumi-plugin-dva
(see.umirc.js
)pages/
: folder or file name will be used for routingroutes/
: route names constants and private routing componentselectos/
: format data form store or network requestsservices/
: making network requestsutils/
: helper and utility filesi18n.js
:i18next
configs
.env.<development|production|staging>
: environment variables.prettierrc
: Prettier config files for editor extension to read.umirc.js
: Umi.js config files, see: https://umijs.org/guide/config.htmldeploy.sh
: build docker image and push to GCP Kubernetes Engine
- Access to GCP Kubernetes Engine via
gcloud
utility - Working
kubectl
command usage - Running docker environment
$ npm version major|minor|patch
- Open
node_modules/antd/es/styles/themes
to find variable to change - Override in
.umirc
:
{
themes: {
"@...": '...',
}
}
- If individual antd component need to be updated, check
node_modules/antd/es
to find variable in use
- Open
src/utils/contract.js
- Add new CAP name, e.g.
export const CAPP02 = 'capp15eth';
- Add new CAP data in
CONTRACT
:
export const CONTRACT = {
...
[CAPP02]: {
...
address: process.env.CAPP02,
key: CAPP02,
}
};
- Add new CAP's contract address to
.env.<development|production|staging>
- Define e.g.
process.env.CAPP02
inumi.js
:
{
...
define: {
...
'process.env.CAPP02': process.env.CAPP02,
}
}
- Add CAP display name in
src/locales/en-locale/contract.json
:
{
"capp15eth": {
"title": "CAPP-15ETH"
}
}
- Add different
abi.json
tosrc/services
- Update
src/services/Web3.js
to apply for different CAP