Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 days ago
JSON representation

:rocket: React + Typescript + Parcel Starter Project

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`.

Back to top :arrow_up: