# @blastoff/blastoff

> blastoff CLI

Latest version **0.0.12** (published 2019-08-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @blastoff/blastoff
pnpm add @blastoff/blastoff
yarn add @blastoff/blastoff
bun add @blastoff/blastoff
```

Provides the command `blastoff`.

## 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.12 |
| Published | 2019-08-08 |
| First published | 2019-08-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 17.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ryanlanciaux |

## Links

- npm: https://www.npmjs.com/package/@blastoff/blastoff
- npm.io page: https://npm.io/package/@blastoff/blastoff

## Dependencies (1)

- [gluegun](https://npm.io/package/gluegun.md) ^2.1.0

## Recent versions

- 0.0.12 (latest) — 2019-08-08
- 0.0.11 — 2019-08-08
- 0.0.10 — 2019-08-08
- 0.0.9 — 2019-08-08
- 0.0.8 — 2019-08-07
- 0.0.7 — 2019-08-06
- 0.0.6 — 2019-08-06
- 0.0.5 — 2019-08-06
- 0.0.4 — 2019-08-06
- 0.0.3 — 2019-08-06
- 0.0.2 — 2019-08-06
- 0.0.1 — 2019-08-06

## README

# blastoff CLI 

A basic CLI for generating components / pages.

## Installation

`npm install -g @blastoff/blastoff`

## Commands

`blastoff g {component|page|screen} Name` (e.g. `blastoff g component Button`)

This will create a component / page / screen along with a storybook story, test, and index file. The test is assuming that you have react-testing-library installed

## Options

- `--path` - the path where the parent folder should be created defaults to `/src/components/`, `src/pages/`, or `/src/screens/`
- `--noStory` - skip creating a story
- `--noTest` - skip creating a test

## Configuration

You can add `blastoff.config.js` to the root of your project for additional customization options such as functions for building the paths (advanced) as well as whether or not to use TypeScript file extensions.

- `useTypeScript` - add ts / tsx extensions to the generated files
- `getComponentPath` - A function that receives path, name, extension, parameters and returns the path where the `component` file should be created
- `getIndexPath` - A function that receives path, name, extension, parameters and returns the path where the `index` file should be created
- `getStoryPath` - A function that receives path, name, extension, parameters and returns the path where the `story` file should be created
- `getTestPath` - A function that receives path, name, extension, parameters and returns the path where the `test` file should be created

All of the functions have a signature like the following:

```
  (path: string, name: string, extension: string, parameters: { [name: string]: any }) => string
```

[Refer to the Gluegun docs for more on Parameters](https://infinitered.github.io/gluegun/)

```js
module.exports = {
  useTypeScript: true,
  getStoryPath: (path, name, extension, parameters) => {
    return `one/${path}/${name}/${name}.stories.${extension}`
  },
  getTestPath: (path, name, extension, parameters) => {
    return `two/${path}/${name}/${name}.test.${extension}`
  },
  getComponentPath: (path, name, extension, parameters) => {
    return `three/${path}/${name}/${name}.${extension}`
  },
  getIndexPath: (path, name, extension, parameters) => {
    return `four/${path}/${name}/index.${extension}`
  }
}
```

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