dashboard of Bytom
Name | Größe | Rev. | Zeit | Autor | Log Message |
---|---|---|---|---|---|
bin | |||||
src | |||||
static | |||||
webpack | |||||
.babelrc | 159 | 50d70a5 | 2018-09-27 16:15:34 | Zhiting Lin | rewrite the async function for multip... |
.bootstraprc | 970 | 50d70a5 | 2018-09-27 16:15:34 | Zhiting Lin | rewrite the async function for multip... |
.eslintignore | 65 | 50d70a5 | 2018-09-27 16:15:34 | Zhiting Lin | rewrite the async function for multip... |
.eslintrc.json | 630 | 50d70a5 | 2018-09-27 16:15:34 | Zhiting Lin | rewrite the async function for multip... |
.gitignore | 66 | 50d70a5 | 2018-09-27 16:15:34 | Zhiting Lin | rewrite the async function for multip... |
README.md | 1.56 k | 50d70a5 | 2018-09-27 16:15:34 | Zhiting Lin | rewrite the async function for multip... |
package-lock.json | 301.22 k | f2694c3 | 2019-07-17 15:13:53 | Zhiting Lin | add upgrade the redux |
package.json | 2.55 k | f2694c3 | 2019-07-17 15:13:53 | Zhiting Lin | add upgrade the redux |
Install Node.js:
brew install node
Install dependencies:
npm install
Start the development server with
npm start
By default, the development server uses the following environment variables with default values to connect to a local Bytom Core instance:
API_URL=http://localhost:3000/api
PROXY_API_HOST=http://localhost:9888
We use eslint
to maintain a consistent code style. To check the source
directory with eslint
, run:
npm run lint src
Babel is used to transpile the latest ES6 syntax into a format understood by
both Node.js and browsers. To get an ES6-compatible REPL (or run a one-off script)
you can use the babel-node
command:
$(npm bin)/babel-node
To inspect and debug Redux actions, we recommend the "Redux DevTools" Chrome extension:
https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd
To generate a new component with a connected stylesheet, use the following command:
npm run generate-component Common/MyComponent
The above command will create two new files in the src/components
directory:
src/components/Common/MyComponent/MyComponent.jsx
src/components/Common/MyComponent/MyComponent.scss
with MyComponent.scss
imported as a stylesheet into MyComponent.jsx
.
Additionally, if there is an index.js
file in src/components/Common
, it
will appropriately add the newly created component to the index exports.