# @compgen/cra-min

> **Unless you are building custom CRA generator then you probably want to use: [@compgen/cra](packages/macro-generators/cra)**

Latest version **0.1.14** (published 2021-03-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @compgen/cra-min
pnpm add @compgen/cra-min
yarn add @compgen/cra-min
bun add @compgen/cra-min
```

Provides the command `cra-min`.

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.14 |
| Published | 2021-03-30 |
| First published | 2020-11-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=14 |
| Dependencies | 1 |
| Unpacked size | 23.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | michal.jarnot |

## Links

- npm: https://www.npmjs.com/package/@compgen/cra-min
- npm.io page: https://npm.io/package/@compgen/cra-min

## Dependencies (1)

- [@compgen/core](https://npm.io/package/@compgen/core.md) ^0.9.0

## Recent versions

- 0.1.14 (latest) — 2021-03-30
- 0.1.13 — 2021-03-27
- 0.1.12 — 2021-02-21
- 0.1.11 — 2021-02-21
- 0.1.10 — 2021-02-21
- 0.1.9 — 2021-02-21
- 0.1.8 — 2021-02-21
- 0.1.7 — 2021-02-20
- 0.1.6 — 2021-02-20
- 0.1.5 — 2021-02-20
- 0.1.4 — 2021-02-20
- 0.1.3 — 2021-02-19
- 0.1.2 — 2021-02-19
- 0.1.1 — 2021-02-19
- 0.1.0 — 2021-02-19
- … 1 more at https://npm.io/package/@compgen/cra-min/versions

## README

# @compgen/cra-min

**Unless you are building custom CRA generator then you probably want to use: [@compgen/cra](packages/macro-generators/cra)**

This is a micro generator for minimal [CRA](https://reactjs.org/docs/create-a-new-react-app.html) configuration. This generator will remove most of the code that CRA generates.

### CLI

I highly recommend using `npx` so that you don't have to install anything globally, and you can always get the latest version from npm.

- **optional** `--path=target_folder`

```bash
npx @compgen/cra-min
```

### Programmatically

You have to generate JSON schema and use `execute` function from `@compgen/core`:

```ts
// src/index.ts
import { execute, getProjectFolder, askProjectName } from '@compgen/core'
import { askYesNo } from '@compgen/core'
import { createSchema } from '@compgen/cra-min'

export const askIsRouter = () => askYesNo('Do you want to use React Router?')

const generate = async () => {
  const { projectFolder } = await askProjectName()
  const isRouter = await askIsRouter()

  const schema = createSchema({ isRouter, projectFolder })
  await execute(schema, projectFolder)
}

generate()
```

Now all you have to do is run:

```
ts-node src/index.ts
```

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