# tradie-template-react-app

> React app.

Latest version **6.1.0-alpha.bdb7e882** (published 2017-08-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install tradie-template-react-app
pnpm add tradie-template-react-app
yarn add tradie-template-react-app
bun add tradie-template-react-app
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.1.0-alpha.bdb7e882 |
| Published | 2017-08-10 |
| First published | 2017-03-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 32 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Maintainers | jameslnewell |

## Links

- npm: https://www.npmjs.com/package/tradie-template-react-app
- Repository: https://github.com/jameslnewell/tradie-v4
- Homepage: https://github.com/jameslnewell/tradie-v4#readme
- Issues: https://github.com/jameslnewell/tradie-v4/issues
- npm.io page: https://npm.io/package/tradie-template-react-app

## Dependencies (32)

- [debug](https://npm.io/package/debug.md) ^2.6.3
- [eslint](https://npm.io/package/eslint.md) ^3.17.1
- [webpack](https://npm.io/package/webpack.md) ^2.2.1
- [babel-core](https://npm.io/package/babel-core.md) ^6.23.1
- [babel-jest](https://npm.io/package/babel-jest.md) ^19.0.0
- [css-loader](https://npm.io/package/css-loader.md) ^0.28.0
- [file-loader](https://npm.io/package/file-loader.md) ^0.11.1
- [null-loader](https://npm.io/package/null-loader.md) ^0.1.1
- [autoprefixer](https://npm.io/package/autoprefixer.md) ^6.7.6
- [babel-loader](https://npm.io/package/babel-loader.md) 7.0.0
- [ext-to-regex](https://npm.io/package/ext-to-regex.md) ^0.1.0
- [style-loader](https://npm.io/package/style-loader.md) ^0.17.0
- [eslint-loader](https://npm.io/package/eslint-loader.md) ^1.6.3
- [postcss-loader](https://npm.io/package/postcss-loader.md) ^1.3.3
- [babel-preset-env](https://npm.io/package/babel-preset-env.md) ^1.2.1
- [trailing-slash-it](https://npm.io/package/trailing-slash-it.md) ^0.3.0
- [babel-preset-react](https://npm.io/package/babel-preset-react.md) ^6.23.0
- [react-test-renderer](https://npm.io/package/react-test-renderer.md) ^15.5.4
- [tradie-webpack-utils](https://npm.io/package/tradie-webpack-utils.md) 6.1.0-alpha.bdb7e882
- [babili-webpack-plugin](https://npm.io/package/babili-webpack-plugin.md) 0.0.11
- [http-proxy-middleware](https://npm.io/package/http-proxy-middleware.md) ^0.17.4
- [webpack-node-externals](https://npm.io/package/webpack-node-externals.md) ^1.5.4
- [eslint-config-jameslnewell](https://npm.io/package/eslint-config-jameslnewell.md) ^3.0.3
- [extract-text-webpack-plugin](https://npm.io/package/extract-text-webpack-plugin.md) ^2.1.0
- [babel-plugin-styled-components](https://npm.io/package/babel-plugin-styled-components.md) ^1.0.1
- [babel-plugin-dynamic-import-node](https://npm.io/package/babel-plugin-dynamic-import-node.md) ^1.0.0
- [babel-plugin-syntax-dynamic-import](https://npm.io/package/babel-plugin-syntax-dynamic-import.md) ^6.18.0
- [babel-plugin-transform-do-expressions](https://npm.io/package/babel-plugin-transform-do-expressions.md) ^6.13.0
- [babel-plugin-transform-react-jsx-self](https://npm.io/package/babel-plugin-transform-react-jsx-self.md) ^6.22.0
- [babel-plugin-transform-class-properties](https://npm.io/package/babel-plugin-transform-class-properties.md) ^6.23.0
- [babel-plugin-transform-react-jsx-source](https://npm.io/package/babel-plugin-transform-react-jsx-source.md) ^6.22.0
- [babel-plugin-transform-object-rest-spread](https://npm.io/package/babel-plugin-transform-object-rest-spread.md) ^6.13.0

## Recent versions

- 6.1.0-alpha.bdb7e882 (latest) — 2017-08-10
- 6.0.0-alpha.22f158e7 (next) — 2017-06-29
- 6.0.0-alpha.f765c75b — 2017-06-29
- 6.0.0-alpha.03bbaefc — 2017-06-23
- 6.0.0-alpha.2f5c99d4 — 2017-06-23
- 6.0.0-alpha.e63c20ec — 2017-06-23
- 4.1.0 — 2017-06-06
- 4.0.4 — 2017-05-07
- 4.0.3 — 2017-05-05
- 4.0.0 — 2017-05-01
- 4.0.0-rc.6 — 2017-05-01
- 4.0.0-rc.5 — 2017-05-01
- 4.0.0-rc.4 — 2017-05-01
- 4.0.0-rc.2 — 2017-04-15
- 4.0.0-rc.0 — 2017-04-15
- … 3 more at https://npm.io/package/tradie-template-react-app/versions

## README

# tradie-template-react-app

A `tradie` template for creating apps with React.


## Installation

```bash
npm install --save-dev tradie@4 tradie-template-react-app
```

## Usage

Create the following files:

- `./src/vendor.js` - Optional. Import all packages you would like in the vendor bundle e.g. `react`, `react-dom`, `react-redux`, `redux`, `react-router` etc. This bundle can be cached forever and saves the user from downloading the bundle again when your app changes. 
- `./src/client.js` - Required. Render your app on the client. Check out [`rechannel`](https://npmjs.com/package/rechannel).
- `./src/server.js` - Required. Use `express` or similar to create a server that serves your app on the server. Check out [`rechannel`](https://npmjs.com/package/rechannel).

Add a scripts section to your `package.json`:
```json
{
  "scripts": {
    "clean": "tradie clean",
    "start": "tradie serve",
    "build": "tradie build --optimize",
    "test": "tradie test --watch"
  }
}
```

Run `npm start`.

## Commands

### `tradie clean`

Remove `./tmp` and `./dist` directories containing temporary and generated files.

### `tradie serve`

Compile vendor, client and server bundles, serve the vendor and client bundles with HMR and run the server bundle.

Transpiled with `babel-preset-env`.... blah blah blah

### `tradie build`

Compile vendor, client and server bundles.

Arguments:

- `--watch` - Watch the source files and re-compile whenever they change
- `--optimize` - 

### `tradie test`

Run all `./src/**/*.test.js` files.

Arguments:

- `--watch` - Watch the test files and re-compile whenever they change
- `--coverage` - Collect coverage information and output reports (see `./tmp/coverage`) 

## Configuration

### `BASE_URL`

## How to...

### Code splitting
`import('./path/to/file').then(module => {/* do something with module */);`

### Short module names

Create files in `./src/node_modules/my-component`

Then import files like `import MyComponent from 'my-component';`

NOTE: don't install public packages in `./src/node_modules` so you can commit this folder.

------


Goals: 
- https://medium.com/google-developers/instant-loading-web-apps-with-an-application-shell-architecture-7c0c2f10c73#.bcwae13h3
- https://medium.com/@addyosmani/progressive-web-apps-with-react-js-part-3-offline-support-and-network-resilience-c84db889162c#.ezj4cdh6i

---
_Source: https://npm.io/package/tradie-template-react-app · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
