# crc-ts

> Simple react component generator with TypeScript and Styled components(by default). Also supported CSS, SASS/SCSS, LESS, STYLUS.

Latest version **1.2.2** (published 2023-09-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install crc-ts
pnpm add crc-ts
yarn add crc-ts
bun add crc-ts
```

Provides the command `crc-ts`.

## 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.2.2 |
| Published | 2023-09-25 |
| First published | 2023-08-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alexander Korotkevich |
| Maintainers | alexander-korotkevich |
| Keywords | react, create-react-component, TypeScript, Styled components, SASS, SCSS, LESS, STYLUS, CSS |

## Links

- npm: https://www.npmjs.com/package/crc-ts
- Repository: https://github.com/Alexander-Korotckevich/crc-ts
- Issues: https://github.com/Alexander-Korotckevich/crc-ts/issues
- npm.io page: https://npm.io/package/crc-ts

## Dependencies (1)

- [chalk](https://npm.io/package/chalk.md) ^4.1.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.2.2 (latest) — 2023-09-25
- 1.2.1 — 2023-09-18
- 1.2.0 — 2023-09-08
- 1.1.0 — 2023-09-01
- 1.0.5 — 2023-08-25
- 1.0.4 — 2023-08-25
- 1.0.3 — 2023-08-25
- 1.0.1 — 2023-08-25
- 1.0.0 — 2023-08-25

## README

# crc-ts

Simple react component generator with TypeScript and Styled components(by default). Also supported CSS, SASS/SCSS, LESS, STYLUS.

## Installation

With [npm](https://npmjs.org/) installed, run

```
npm install -g crc-ts
```

Then you can generate React component:

```
crc-ts ReactComponentName
```

## API

```
crc-ts [component-name] [path] [--styles]
```

- Default component name is `Component`.
- Default path value is `./src/components`.
- Default styles flag is `--styled`. Available flags:
    - `--styled`
    - `--sass`
    - `--scss`
    - `--css`
    - `--less`
    - `--stylus`


### Example
Result of `crc-ts`:

```
|-- /src
    |--/components
        |-- /Component
            |-- Component.tsx
            |-- index.ts
            |-- styles.ts
```

Result of `crc-ts ExampleComponentName`:

```
|-- /src
    |--/components
        |-- /ExampleComponentName
            |-- ExampleComponentName.tsx
            |-- index.ts
            |-- styles.ts
```

Result of `crc-ts ExampleComponentName ./src/example` will generate the following:

```
|-- /src
    |--/example
        |-- /ExampleComponentName
            |-- ExampleComponentName.tsx
            |-- index.ts
            |-- styles.ts
```
Result of `crc-ts ExampleComponentName ./src/example --scss` will generate the following:

```
|-- /src
    |--/example
        |-- /ExampleComponentName
            |-- ExampleComponentName.tsx
            |-- index.ts
            |-- examplecomponentname.module.scss
```

Result of `crc-ts ExampleComponentName ./src/example --css` will generate the following:

```
|-- /src
    |--/example
        |-- /ExampleComponentName
            |-- ExampleComponentName.tsx
            |-- index.ts
            |-- examplecomponentname.css
```

## License

MIT © Alexander Korotkevich

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