https://github.com/bytecodeagency/bytecode-react-cli
(MIRROR) Bytecode React CLI that creates React components in line with the Bytecode Coding Standards
https://github.com/bytecodeagency/bytecode-react-cli
bytecode bytecode-agency cli react reactjs
Last synced: about 1 month ago
JSON representation
(MIRROR) Bytecode React CLI that creates React components in line with the Bytecode Coding Standards
- Host: GitHub
- URL: https://github.com/bytecodeagency/bytecode-react-cli
- Owner: BytecodeAgency
- License: gpl-3.0
- Created: 2019-10-16T18:53:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-11T09:11:27.000Z (over 5 years ago)
- Last Synced: 2025-03-03T08:38:40.921Z (11 months ago)
- Topics: bytecode, bytecode-agency, cli, react, reactjs
- Language: JavaScript
- Homepage:
- Size: 104 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bytecode React CLI
> Currently in alpha phase, the CLI API is not yet stable
A command-line tool to generate React components in Typescript following the conventions at Bytecode.
## Installation
Run `yarn add -D bytecode-react-cli`.
## Usage
You can use the CLI by adding the command to your `package.json` script section: `"bcr": "./node_modules/bytecode-react-cli/bin/cli.js"`.
Before you can use the CLI tool, add a `.bcr-config.js` file, f.e.:
Web:
```js
module.exports = {
options: {
Component: { path: "src/components", template: "reactWebNoRedux" },
Container: { path: "src/containers", template: "reactWebWithRedux" },
Section: { path: "src/sections", template: "reactWebWithRedux" },
Page: { path: "src/pages", template: "reactWebNoRedux" },
ReduxDomain: {
path: "src/store",
template: "reduxDomain",
additionalInstructions:
"Don't forget to add your domain to the `src/store/rootReducer.ts` file and the StoreState type",
},
},
};
```
Or for native:
```js
module.exports = {
options: {
Component: { path: "src/components", template: "reactNativeNoRedux" },
Container: { path: "src/containers", template: "reactNativeWithRedux" },
Section: { path: "src/sections", template: "reactNativeWithRedux" },
Page: { path: "src/pages", template: "reactNativeNoRedux" },
ReduxDomain: {
path: "src/store",
template: "reduxDomain",
additionalInstructions:
"Don't forget to add your domain to the `src/store/rootReducer.ts` file and the StoreState type",
},
},
};
```
## Available templates
* `reactWebNoRedux`
* `reactWebWithRedux`
* `reactNativeNoRedux`
* `reactNativeWithRedux`
* `reduxDomain`
## License
GPL-3.0-only