scaffs-cli

0.6.4 • Public • Published

Scaffs-CLI

Npm Version Npm Downloads Build Status Build status

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. This particular example is angular, but scaffs can be created for anything.

Install, add scaff, create module

Setup and basic usage

Create component

Create component

Create service

Create service

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).

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

Contributing

TODO

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

Readme

Keywords

none

Package Sidebar

Install

npm i scaffs-cli

Weekly Downloads

1

Version

0.6.4

License

MIT

Last publish

Collaborators

  • itslennysfault
  • scaffs