# app-starter

> ```sh npx create-app-starter my-app

Latest version **0.0.23** (published 2019-02-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install app-starter
pnpm add app-starter
yarn add app-starter
bun add app-starter
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.23 |
| Published | 2019-02-21 |
| First published | 2019-02-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 51.1 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | yes |
| Author | github.com/ItsLeeOwen |
| Maintainers | itsleeowen |

## Links

- npm: https://www.npmjs.com/package/app-starter
- Homepage: https://github.com/ItsLeeOwen/app-starter
- npm.io page: https://npm.io/package/app-starter

## Dependencies (6)

- [ajv](https://npm.io/package/ajv.md) 6.9.1
- [react](https://npm.io/package/react.md) ^16.8.2
- [node-sass](https://npm.io/package/node-sass.md) ^4.11.0
- [react-dom](https://npm.io/package/react-dom.md) ^16.8.2
- [react-router-dom](https://npm.io/package/react-router-dom.md) ^4.2.2
- [webpack-config-starter](https://npm.io/package/webpack-config-starter.md) ^0.0.25

## Recent versions

- 0.0.23 (latest) — 2019-02-21
- 0.0.19 (master) — 2019-02-11
- 0.0.18 (vanilla) — 2019-02-11
- 0.0.22 — 2019-02-11
- 0.0.21 — 2019-02-11
- 0.0.20 — 2019-02-11
- 0.0.17 — 2019-02-09
- 0.0.15 — 2019-02-09
- 0.0.14 — 2019-02-09
- 0.0.13 — 2019-02-09
- 0.0.12 — 2019-02-09
- 0.0.11 — 2019-02-09
- 0.0.10 — 2019-02-09
- 0.0.9 — 2019-02-09
- 0.0.8 — 2019-02-09
- … 2 more at https://npm.io/package/app-starter/versions

## README

## Get Started

```sh
npx create-app-starter my-app

# If you want to create a pure js/css/html app include `vanilla` as the 4th argument
npx create-app-starter my-app vanilla
```

or

```sh
git clone https://github.com/ItsLeeOwen/app-starter.git my-app

cd my-app

# If you want to create a pure js/css/html app include
# checkout the vanilla branch
git checkout vanilla

npm install
```

That's it.

## Code Splitting

Add additional packages to package.json's "webpack.entry" config.

```json
"webpack": {
  "entry": {
    "index.html": "./src/index.html",
    "index.js": "./src/index.js",

    "login.html": "./src/login.html",
    "login.js": "./src/login.js"
  }
}
```

## .env Environment Vars

Want to expose environment variables to your javascript? Use a .env file in the root of your project. The variables will be accessible on `process.env`, such as `process.env.PUBLIC_KEY_EXAMPLE`.

Although these values are not committed to your github repo when `.env` is gitignored, they ARE transpiled in your clientside code, so don't use any private secrets, or anything you don't want others to find.

Restarting your app between .env changes is required.

```json
"webpack": {
  "env": {
    "PUBLIC_KEY_EXAMPLE": "$PUBLIC_KEY_EXAMPLE"
  }
}
```

## Heroku Integration

Heroku cli is required, if not already installed you can install [heroku cli](https://devcenter.heroku.com/articles/heroku-cli#download-and-install) with brew.

```sh
brew tap heroku/brew && brew install heroku
```

### Dockerfile

Any .env vars in use need to be added to the ARG section of the `Dockerfile` found in the root of your project.

```dockerfile
# dockerfile build arg example
ARG PUBLIC_KEY_EXAMPLE="default"
```

To publish to heroku, your project will need to be added to heroku once:

```sh
./heroku/create
```

After this you can deploy the project to heroku using:

```sh
./heroku/deploy
```

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