https://github.com/thecodechef/react-generator
https://github.com/thecodechef/react-generator
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/thecodechef/react-generator
- Owner: thecodechef
- Created: 2019-04-02T09:10:30.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-02T09:37:45.000Z (about 7 years ago)
- Last Synced: 2026-01-01T09:02:48.571Z (6 months ago)
- Language: JavaScript
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# nano-react-app-template
The template project for [nano-react-app](https://github.com/adrianmcli/nano-react-app).
- `npm start` — This will spawn a development server with a default port of `1234`.
- `npm run build` — This will output a production build in the `dist` directory.
## Custom port
You can use the `-p` flag to specify a port for development. To do this, you can either run `npm start` with an additional flag:
```
npm start -- -p 3000
```
Or edit the `start` script directly:
```
parcel index.html -p 3000
```
## Adding styles
You can use CSS files with simple ES2015 `import` statements in your Javascript:
```js
import "./index.css";
```
## Babel transforms
The Babel preset [babel-preset-nano-react-app](https://github.com/adrianmcli/babel-preset-nano-react-app) and a small amount of configuration is used to support the same transforms that Create React App supports.
The Babel configuration lives inside `package.json` and will override an external `.babelrc` file, so if you want to use `.babelrc` remember to delete the `babel` property inside `package.json`.