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.gitUsage
Install Yeoman if you don't have it installed globally.
npm i -g yoAvailable commands
yo cells:componentgenerates a Web Component.yo cells:behaviorgenerates a Polymer Behavior.yo cells:themegenerates a theme.yo cells:data-managergenerates 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-promptsThe 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-generatorThen 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 test8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago