generator-cells v2.1.3
generator-cells
Generates an scaffold for a Cells component using Yeoman.
Install
npm i -g git+ssh://git@globaldevtools.bbva.com:7999/ctool/generator-cells.git
Usage
Install Yeoman if you don't have it installed globally.
npm i -g yo
Available commands
yo cells:component
generates a Web Component.yo cells:behavior
generates a Polymer Behavior.yo cells:theme
generates a theme.yo cells:data-manager
generates a Data Manager.
Command line options
The flag --skip-prompts
will generate the component with the options specified in a .yo-rc.json file.
yo cells:component --skip-prompts
The file must exist in the directory where the commnand is executed.
Check out Yeoman Storage API for more information.
Example .yo-rc.json file
{
"generator-cells": {
"theme": {
"name": "some-theme",
"coronitaFonts": true,
"coronitaColors": true,
"hybrid": false
},
"behavior": {
"name": "some-behavior",
"description": "My fabulous behavior",
"hybrid": false
},
"component": {
"name": "some-component",
"description": "My awesome component",
"hybrid": false,
"i18n": true,
"extras": false,
"useTheme": true,
"themeName": [
{
"theme": "cells-coronita-theme",
"version": "^1.0.0"
},
{
"theme": "cells-banking-theme",
"version": "^0.X.0"
}
],
"useIcons": true,
"iconsName": [
{
"name": "coronita-icons",
"version": "^3.0.0"
}
]
},
"data-manager": {
"name": "some-datamanager",
"description": "Datamanager description",
"genericDp": false,
"hybrid": false
}
}
}
Adding new subgenerators
First, install generator-generator globally.
npm i -g yo generator-generator
Then create a new subgenerator:
cd generator-cells
yo generator:subgenerator <name>
This will create a folder with the specified name and test files for the new subgenerator.
Running tests
cd generator-cells && npm install
npm run test
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago