# @ebsolutions/generate-react-templates

> This package is used to generate React template files for a component, container, or page (NextJS)

Latest version **1.7.2** (published 2022-10-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install @ebsolutions/generate-react-templates
pnpm add @ebsolutions/generate-react-templates
yarn add @ebsolutions/generate-react-templates
bun add @ebsolutions/generate-react-templates
```

## 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 | 1.7.2 |
| Published | 2022-10-11 |
| First published | 2020-03-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14.0.0 |
| Dependencies | 3 |
| Unpacked size | 26.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Aaron Sisler |
| Maintainers | aaron.sisler |
| Keywords | react container template, react component template, react page template, next page template, nextjs page template |

## Links

- npm: https://www.npmjs.com/package/@ebsolutions/generate-react-templates
- Repository: https://github.com/aaronsisler/packages.generate-react-templates
- Homepage: https://github.com/aaronsisler/packages.generate-react-templates#readme
- Issues: https://github.com/aaronsisler/packages.generate-react-templates/issues
- npm.io page: https://npm.io/package/@ebsolutions/generate-react-templates

## Dependencies (3)

- [fs-extra](https://npm.io/package/fs-extra.md) ^8.1.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [replace-in-file](https://npm.io/package/replace-in-file.md) ^5.0.2

## Recent versions

- 1.7.2 (latest) — 2022-10-11
- 1.7.1 — 2022-05-11
- 1.7.0 — 2021-11-24
- 1.6.3 — 2021-11-24
- 1.6.2 — 2021-11-23
- 1.6.1 — 2021-05-03
- 1.6.0 — 2020-12-14
- 1.5.0 — 2020-12-14
- 1.4.0 — 2020-12-13
- 1.3.2 — 2020-07-21
- 1.3.0 — 2020-07-20
- 1.2.0 — 2020-07-20
- 1.1.0 — 2020-07-20
- 1.0.0 — 2020-06-17
- 0.8.0 — 2020-03-08
- … 4 more at https://npm.io/package/@ebsolutions/generate-react-templates/versions

## README

# Generate React Templates

This package is used to generate React template files for a component, container, or page (NextJS). The container and component files returned can be either Typescript or Javascript depending on the flag passed.

## Usage

1. Install the package using npm or yarn:

   ```bash
    npm install @ebsolutions/generate-react-templates --saveDev
   ```

   or

   ```bash
    yarn add @ebsolutions/generate-react-templates --dev
   ```

2. Run the desired command to generate the applicable template(s):

```bash
   node ./node_modules/@ebsolutions/generate-react-templates --type=COMP --name=taco
   node ./node_modules/@ebsolutions/generate-react-templates --type=CONT --name=taco
   node ./node_modules/@ebsolutions/generate-react-templates --type=PAGE --name=taco

```

**NOTE**: Adding --useTypescript==true to the CONT and COMP types will return Typescript (`.tsx` and `.ts`) files.

## Example return value:

The package creates a the following file(s) and places them into their corresponding directory.

### Page

Creates a page in the `pages/` directory as shown below:

      src/pages/page-name.js

### Container

Creates a container (Typescript or Javascript) in the `containers/` directory with file structure below:

      containers/name-container/
         - name-container.jsx`
         - index.js
         - name-container.module.scss

### Component

Creates a component (Typescript or Javascript) in the `components/` directory with file structure below:

     components/name-component/
         - name-component.jsx`
         - index.js
         - name-component.module.scss

## Finshing touches

1. Getting scripts to populate `package.json` on install
   - "gen:comp": "node ./node_modules/@ebsolutions/generate-react-templates --type=COMP --name=taco"
   - "gen:cont": "node ./node_modules/@ebsolutions/generate-react-templates --type=CONT --name=taco"
   - "gen:page": "node ./node_modules/@ebsolutions/generate-react-templates --type=PAGE --name=taco"

### Enhancements

1. Get `npx` command to work or add a script to package.json that calls node ./node_modules/etc.
1. Testing

---
_Source: https://npm.io/package/@ebsolutions/generate-react-templates · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
