https://github.com/yagolopez/react-parcel
:rocket: React + Typescript + Parcel Starter Project
https://github.com/yagolopez/react-parcel
boilerplate parcel parcel-bundler react starter typescript
Last synced: 10 months ago
JSON representation
:rocket: React + Typescript + Parcel Starter Project
- Host: GitHub
- URL: https://github.com/yagolopez/react-parcel
- Owner: YagoLopez
- License: mit
- Created: 2018-01-16T20:17:47.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-30T19:55:02.000Z (over 5 years ago)
- Last Synced: 2025-04-09T18:14:45.178Z (10 months ago)
- Topics: boilerplate, parcel, parcel-bundler, react, starter, typescript
- Language: HTML
- Homepage:
- Size: 2.05 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
React + Parcel + TypeScript
- Forked from [this](https://github.com/emaren84/ts-react-parcel) repository.
- [DEMO](https://yagolopez.js.org/react-parcel/dist/)
- Zero configuration
- Fast initial build times
- Fast sucesive rebuild times
- Hot reload supported by default
- Dynamic imports supported by default
- Test configuration using Jest + Enzyme
- File proccessors for Jest (`css|less|jpg|jpeg|png|gif|eot|otf|webp|svg`) etc.
- React + ReactDOM (ver.16)
- Parcel bundler
## Setup
- Clone or download the repository
- If not installed, install **yarn** package manager
- Go to project folder and run in command line
```shell
$ yarn
```
## Run
```shell
$ yarn develop
```
Execute the command and you can run & test the application on `localhost:1234` in the browser.
## Build
```shell
$ yarn build
```
The default output directory is `/dist`. You can change the destination wherever you want.
```javascript
// package.json
// ...
"scripts": {
// ...
"build": "parcel build ./src/index.html -d YOUR_OUTPUT_DIR --public-url ./" // <- Change here
}
// ...
```
## Test
```shell
$ yarn test # run tests suites once
$ yarn test:watch # watch mode
$ yarn coverage # code coverage
```
- Config tests in `config` folder
- You have to create `__tests__` directory at the same location of files which you want to test.
- Test file's name should be `SOURCE.test.ts/tsx/js` or `SOURCE.spec.ts/tsx/js`.