# scaffs-cli

> A simple language agnostic scaffolder

Latest version **0.6.4** (published 2017-05-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install scaffs-cli
pnpm add scaffs-cli
yarn add scaffs-cli
bun add scaffs-cli
```

Provides the command `scaffs`.

## 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.6.4 |
| Published | 2017-05-13 |
| First published | 2017-04-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=5.0.0 |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Lenny Urbanowski |
| Maintainers | itslennysfault, scaffs |

## Links

- npm: https://www.npmjs.com/package/scaffs-cli
- Repository: https://github.com/itslenny/scaffs-cli
- Homepage: https://github.com/itslenny/scaffs-cli#readme
- Issues: https://github.com/itslenny/scaffs-cli/issues
- npm.io page: https://npm.io/package/scaffs-cli

## Dependencies (4)

- [scaffs](https://npm.io/package/scaffs.md) 0.5.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^2.1.2
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [prompt-sync](https://npm.io/package/prompt-sync.md) ^4.1.4

## Recent versions

- 0.6.4 (latest) — 2017-05-13
- 0.6.3 — 2017-05-12
- 0.6.2 — 2017-05-12
- 0.6.1 — 2017-05-12
- 0.6.0 — 2017-05-01
- 0.5.0 — 2017-05-01
- 0.4.0 — 2017-04-25
- 0.3.7 — 2017-04-25
- 0.3.6 — 2017-04-25
- 0.3.5 — 2017-04-25
- 0.3.2 — 2017-04-24
- 0.3.1 — 2017-04-24
- 0.3.0 — 2017-04-24
- 0.2.0 — 2017-04-24
- 0.1.0 — 2017-04-24
- … 6 more at https://npm.io/package/scaffs-cli/versions

## README

# ![Scaffs](https://raw.githubusercontent.com/itslenny/scaffs-cli/master/docs/images/Logo_Full_64.png)-CLI

[![Npm Version](https://img.shields.io/npm/v/scaffs-cli.svg?style=flat)](https://www.npmjs.com/package/scaffs-cli)
[![Npm Downloads](https://img.shields.io/npm/dm/scaffs-cli.svg?style=flat)](https://www.npmjs.com/package/scaffs-cli)
[![Build Status](https://travis-ci.org/itslenny/scaffs-cli.svg?branch=master)](https://travis-ci.org/itslenny/scaffs-cli)
[![Build status](https://ci.appveyor.com/api/projects/status/wfh45fnmixsnqkk6?svg=true)](https://ci.appveyor.com/project/itslenny/scaffs-cli)

This is the cli scaffs utility.

## Install

```
npm i -g scaffs-cli
```

## Examples

The gifs below show a simple example of scaffolding basic project from using the angular scaff from the [@scaffs registry](https://github.com/itslenny/scaffs-registry). This particular example is angular, but scaffs can be created for anything.

**Install, add scaff, create module**

![Setup and basic usage](https://raw.githubusercontent.com/itslenny/scaffs-cli/master/docs/images/01-cli-intro.gif)

**Create component**

![Create component](https://raw.githubusercontent.com/itslenny/scaffs-cli/master/docs/images/02-cli-component.gif)

**Create service**

![Create service](https://raw.githubusercontent.com/itslenny/scaffs-cli/master/docs/images/03-cli-service.gif)

## Usage

### Help screen

```
scaffs help
```

### List available scaffs

```
scaffs list
```

### New files from scaffold - basic

Simply running the new command with a scaffold name will prompt you for any variables defined by the scaffold (e.g name, target path, etc) then it will generate files based on the scaffold

```
scaffs new ScaffoldName
```

> You can create your own scaffs or install them from the @scaffs registry ([learn more about both below](#additional-resources)).

### Scaffold - providing data with flags

You can bypass the prompts by simply providing all the needed data in flags.

* `--target` = the path where you want to place the generated files
* `--data.name` = by convention this is the name of the component
* `--data.otherValue` = other value(s) you need to pass into the template

```
scaffs new ScaffoldName --target /create/at/this/path --data.name my thing --data.someNumbers=[1,3,5,7,9]
```

### Scaffold - by path

You can load scaffolds by name (explained above) or by providing a relative/absolute path to the scaffold with the `--source` flag.

```
scaffs new --source ./path/to/scaffs/my-scaff
```

> This can be used in conjunction with any of the flags explained above

## Additional resources

* [Scaffs library / programmatic usage](https://github.com/itslenny/scaffs) | [npm](https://www.npmjs.com/package/scaffs)
* [Scaffs cli / command line usage](https://github.com/itslenny/scaffs-cli) | [npm](https://www.npmjs.com/package/scaffs-cli)
* [Scaffs vs code plugin](https://github.com/itslenny/scaffs-vscode) | [vs code marketplace](https://marketplace.visualstudio.com/items?itemName=itslennysfault.scaffs-vscode)
* [@scaffs registry](https://github.com/itslenny/scaffs-registry) | [npm](https://www.npmjs.com/~scaffs)
* [Using scaffs config](https://github.com/itslenny/scaffs/tree/master/docs/md/config.md)
* [Creating scaffs](https://github.com/itslenny/scaffs/tree/master/docs/md/create.md)

## Contributing

* [Contributing to Scaffs](CONTRIBUTING.md)
* Contributing a Scaff

## TODO

* Add comments
* Add more tests
* Break up documentation into separate pages
* Refactor to Async/Await

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