parcel-react-app v2.0.4
Parcel React App
Create React apps using Parcel as build tool.
Table of Contents
Getting started
Installation
Install parcel-react-app globally:
npm i -g parcel-react-appUsage
To create a new app, run:
parcel-react-app newFirst, you need to enter the name of the project (e.g. my-app), author of the project and then select the style type (css, scss, css-modules or styled-components). This will create a folder my-app and install all dependencies. Folder structure (for css):
my-app/
|-- config/
| |-- jestSetup.js
|-- public/
| |-- favicon.ico
| |-- index.html
|-- src/
| |-- components/
| | |-- App.css
| | |-- App.js
| | |-- App.test.js
| |-- images/
| |-- parceljs.png
| |-- reactjs.png
| |-- index.css
| |-- index.js
|-- .babelrc
|-- .eslintrc.json
|-- .gitignore
|-- .prettierrc
|-- .stylelintrc
|-- package-lock.json
|-- package.json
|-- README.mdDevelopment
Start the development server run:
npm run devThis will automatically open http://localhost:3000 in your browser.
Production
Build for production run:
npm run buildThis will bundle your application in the build folder.
Formatting and Linting
The app uses eslint and stylelint for linting and prettier for formatting files. Supports the following file extensions: .js, .jsx, .json, .md, .css and .scss.
To fix formatting issues:
npm run formatTo lint your code:
npm run lintFormatting and Linting JS
If you want to fix JavaScript issues:
npm run format:jsTo lint JavaScript code:
npm run lint:jsThis will also fix or lint if you have .json and .md files inside the src/ folder.
Formatting and Linting Styles
If you want to fix only style issues:
npm run format:styleTo lint your style:
npm run lint:styleTesting
The app uses Jest a test runner and Enzyme a testing utilitis for React.
To run all unit tests:
npm run testRun watch mode:
npm run test:watchGet coverage report run:
npm run test:coverageLicense
This project is licensed under the MIT License - see the LICENSE file for details.
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago