gs-hygen
v1.2.1
Published
Remote hygen templates generator
Downloads
11
Readme
gs-hygen
Installation
This is a Node.js module available through the npm registry.
Before installing, download and install Node.js. Node.js v14 or higher is required.
Installation is done using the
npm install
command:
$ npm install -g gs-hygen
Install from git repository
git clone https://github.com/guidesmiths/gs-hygen
npm install --quiet
npm pack
npm i -g gs-hygen-*.tgz
gs-hygen --help
Usage examples
gs-hygen \
template \
--url [email protected]:guidesmiths/infinitas-hygen-template-generators.git \
--generator service-systemic-basics,nvm,commitlint,jest-systemic,jest-systemic-mock-bus \
--output /tmp/generator-demo-repo \
git \
--private-key ~/.ssh/id_rsa \
--public-key ~/.ssh/id_rsa.pub
CLI options
Getting help
gs-hygen --help
gs-hygen [command]
Commands:
gs-hygen template Template command
gs-hygen git Git command
Options:
--version Show version number [boolean]
--url the template git repository url [string] [default: ""]
--generator the template generators, example: "docker,git,eslint"
[string]
--output the template generator output files [string] [required]
--username git username [string] [default: "git"]
--credentials git username credentials [string] [default: ""]
--public-key git user public key [string] [default: ""]
--private-key git user provate key [string] [default: ""]
-h, --help Show help [boolean]
Optional parameters
You can also choose the generators manually avoiding to provide the --generator
argument, the output will look like this:
Creating templates
This project only supports templates for hygen. So what we need is to generate a new project with the hygen templates section already generated.
mkdir new-templates
cd new-templates
git init -b main
mkdir generator _shared
# Visit the hygen docs for generating some basic hygen generator
# http://www.hygen.io/docs/quick-start
git add .
git commit -m "New template generators"
git remote add origin <REMOTE_URL>
git push origin main
This templates project repo is a good starting point