# create-container-component

> Tool to generate React container and/or components from the terminal

Latest version **1.0.0** (published 2017-06-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install create-container-component
pnpm add create-container-component
yarn add create-container-component
bun add create-container-component
```

Provides the command `create-container-component`.

## 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.0.0 |
| Published | 2017-06-29 |
| First published | 2017-06-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | David Lewallen |
| Maintainers | davidlewallen |

## Links

- npm: https://www.npmjs.com/package/create-container-component
- Repository: https://github.com/davidlewallen/create-container-component
- Homepage: https://github.com/davidlewallen/create-container-component#readme
- Issues: https://github.com/davidlewallen/create-container-component/issues
- npm.io page: https://npm.io/package/create-container-component

## Dependencies (2)

- [fs-extra](https://npm.io/package/fs-extra.md) ^3.0.1
- [inquirer](https://npm.io/package/inquirer.md) ^3.0.6

## Recent versions

- 1.0.0 (latest) — 2017-06-29
- 0.3.0 — 2017-06-29
- 0.2.2 — 2017-06-29
- 0.2.1 — 2017-06-29
- 0.2.0 — 2017-06-29
- 0.1.0 — 2017-06-29

## README

# create-container-component
This is a stripped down and modifed version of [create-component-app](https://github.com/CVarisco/create-component-app) that creates either a React component or a React container and component from the terminal.
## Install

```sh
$ npm install -g create-container-component
```

## Usage

```sh
$ cd ~/my-projects
$ create-container-component
```
You will be asked if you would like to create a container or a component.
Creating a container will automatically generate a component as well.

## Example
After providing it with the required information you will see the following

Creating with component:
```
DefaultName
    |-- components
    |   |-- index.jsx
```
```js
import React from 'react';
import PropTypes from 'prop-types';

const {} = PropTypes;
const propTypes = {};

function DefaultName(props) {
  return ();
}

DefaultName.propTypes = propTypes;
export default DefaultName;
```
Creating with container:
```
ProvidedName
    |-- components
    |   |-- index.jsx
    |-- container
    |   |-- ProvidedName
```
```js
import React, { Component } from 'react';
import PropTypes from 'prop-types';

import DefaultName from '../components';

const {} = PropTypes;
const propTypes = {};

class DefaultNameContainer extends Component {
  constructor() {
    super();
  }

  render() {
    return (
      <DefaultName />
    );
  }
}

DefaultNameContainer.propTypes = propTypes;
export default DefaultNameContainer;
```

## Contributing
The library is open to everybody, contribute improve your skills.

Use `npm run watch` while coding.

## Credit
Credit for this project goes to [Christian Varisco](https://github.com/CVarisco)

## License

MIT © [David Lewallen](https://github.com/davidlewallen)

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