Generator blip Plugin
Yeoman generator for a blip Plugin and ready to Kubernetes and helm.
File Structure
Assuming your folder is called blip-plugin-project
.
Whatever name you choose will replace all occurrences of that string in the project
📁blip-plugin-project
|__📁charts
|__📁blip-plugin-project
| |__📁templates
| | |__📃{_helpers.tpl}
| | |__📃{autoscale.yaml}
| | |__📃{deployment.yaml}
| | |__📃{ingress.yaml}
| | |__📃{secrets.yaml}
| | |__📃{service.yaml}
| |__📃{.helmignore}
| |__📃{Chart.yaml}
| |__📃{values.yaml}
|__📁src
|__📁api
| |__📃{application-service.js}
| |__📃{common-service.js}
|__📁components
| |__📁SomeComponent
| | |__📃{SomeComponent.js}
| | |__📃{index.js}
|__📁contexts
| |__📃{CommonContext.js}
|__📁hooks
| |__📃{content-localizer.js}
|__📁reducers
| |__📃{common-reducer.js}
|__📃{_globals.scss}
|__⚙️{appsettings.json}
|__📃{index.js}
|__📃{index.scss}
|__📃{service-worker.js}
|__📁test
| |__📃{README.md}
|__⚙️.editorconfig
|__⚙️.eslintignore
|__⚙️.eslintrc
|__⚙️.gitattributes
|__⚙️.gitignore
|__⚙️.prettierrc
|__🐋Dockerfile
|__⚙️jsconfig.json
|__⚙️LICENSE
|__⚙️package.json
|__⚙️README.md
Usage
Generate without install Yeoman
# Create a directory for your project && Change into directory
$ mkdir my-plugin-name && cd my-plugin-name
# Generate a project
$ npm init yo generator-blip-plugin
Generate installing Yeoman
- Install Yeoman
# npm: installed yeoman globally
$ npm install -g yo
- Install Generator
# npm: installed blip plugin generator
$ npm install -g generator-blip-plugin
- Creating a project
# mkdir: created dir `my-plugin-name`
# cd: navigated to dir `my-plugin-name`
$ mkdir my-plugin-name && cd my-plugin-name
# yo: ask questions and generate blip plugin project
$ yo blip-plugin
- Running project
Action | Usage |
---|---|
Create the dependencies and files JSON |
npm run prepare |
Linting code | npm run lint |
Running unit tests | npm run jest |
Running lint + tests | npm test |
Running code coverage | npm run coverage |
Sending coverage results to Coveralls.io | npm run coveralls |
Development
IF YOU ADD NEW FILES OR DEPENDENCIES TO THE TEMPLATE YOU MUST RUN PREPARE SCRIPT
# npm: run prepare script which creates dependencies.json and files.json
$ npm run prepare
Prerequisites
# npm: installed yeoman globally
$ npm install -g yo
Clone the repo
# git: clone this repo
$ git clone https://github.com/chr0m1ng/generator-blip-plugin.git
Run generator
# Change into directory
$ cd generator-blip-plugin
# Link generator
$ npm link
# Run generator
$ yo blip-plugin
Author
This generator was created based on original oss generator created by Roberto Achar.