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-proe2e/: ignore thislayouts/: layout files forpages/,src/layouts/index.jswill be used for global layoutlocales/: store locale file in.jsonformatmodels/: 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:i18nextconfigs
.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
gcloudutility - Working
kubectlcommand usage - Running docker environment
$ npm version major|minor|patch- Open
node_modules/antd/es/styles/themesto find variable to change - Override in
.umirc:
{
themes: {
"@...": '...',
}
}- If individual antd component need to be updated, check
node_modules/antd/esto 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.CAPP02inumi.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.jsontosrc/services - Update
src/services/Web3.jsto apply for different CAP