generator-cosy
v0.20.1
Published
A yeoman generator for creating a frontend COmponent SYstem
Downloads
11
Readme
Usage
Create your project
Install the required tools and generator: yo
, generator-cosy
// npm
npm install -g yo generator-cosy
// yarn
yarn global add yo generator-cosy
Make a new directory, and cd
into it:
mkdir my-new-component-system && cd $_
Run yo cosy
to setup your component system folder structure
yo cosy
Questions the generator will ask
- Your project name
- Do you want to use
@scoped
npm package names - Package scope name (only if previous question is true, will use
@scope
as prefix for your packages) - Do you want to use yarn?
- Do you want to use yarn workspaces (only if previous question is true)
Subgenerators
yo cosy:package <component-name>
Generates a new component as package.
If you have specified a @scope
, this subgenerator will use the package scope as prefix for your new created package name.
You can omit the <component-name>
part on the cli, the generator will than ask for your component name.
Questions
- Component name (only if not specified as cli argument)
- Package name
- Atomic design stage (Atom, Molecules, Organism, Template, Page)