generator_poc
v2.0.7
Published
Code generator for apps like reactjs, angular, vanillajs, vuejs etc.
Downloads
71
Readme
Generator POC
Generate apps with no manual configurations It works on Windows, MacOS, and Linux
Note
Currently stable template is Webmd Client Template
. Hence please select it as your templates choice.
Below templates are still under development:
React, Angular, Vue
Pre-requisites
Make sure you have below setup before using this plugin:
1. Gitlab SSH-key setup on your machine
2. Node JS command line tool installed on your machine
3. Node JS version >=8.0.0 installed
Quick Overview
For better performance, it's is recommended to run the tool in NodeJS command prompt in Administrator mode
npm i -g generator_poc
cd <project-location>
generate
The generate
command will ask a couple of questions and wil generate initial folder structure with all configurations required in your project.
? What project template would you like to generate `Webmd Client Template`
================================================
Setting up webmd-client-template application
================================================
? Name of Client : astra-zenca
? Please Enter SF# : 20203.9
? Please Enter Brand Name : farxiga
? Please Enter Program Name : edit-destination
? Please Enter Friendly url : diabetes heart-20
It will create a directory called <client-name>
inside the current folder.
Inside that directory, it will generate the initial project structure and install the transitive dependencies:
<client-name>/
└──<brand-name>/
└──<program-name>/
├── README.md
├── node_modules/
└── src/
└── css/
└── overrides.scss
└── style.scss
├── img/
└── js/
└── script.js
├── modules/
└── <friendly-url>.html
├── .babelrc
├── .eslintrc
├── .gitignore
├── .npmignore
├── .stylelintrc
├── Gruntfile.js
├── package.json
└── sponsor.config.js
Few more commands
You can use this command to generate any new js, scss or html file under your program. Just cd
to you program path and run this command:
Note: If you have selected Webmd Client Template
from your choices for template then you will have access to below commands:
generate-file-type <type> <fileName>
generate-file-type html <filename> //generate-file-type html demo
generate-file-type js <filename> //generate-file-type js demo
generate-file-type scss <filename> //generate-file-typr scss demo
generate-program
If you want to create a new program under the same brand name just cd
to you project path (under client name or brand name) and run this command.
This will ask a couple of questions and wil generate initial folder structure with all configurations required in your project.
D:\workspace\revenue\generate_test\astra-zeneca>generate-program
? Please Enter SF# 2020.18
? Please Enter Program Name : <example-program-name>
? Please Enter Friendly url : <example-friendly-url>
generate-brand
If you want to create a new brand under the same client name just cd
to your project's root folder and run this command.
This will ask a couple of questions and wil generate initial folder structure with all configurations required under your brand.
D:\workspace\revenue\generate_test\astra-zeneca>generate-brand
? Please Enter SF# 2020.19
? Please Enter Brand Name : <example-brand-name>
? Please Enter Program Name : <example-program-name>
? Please Enter Friendly url : <example-friendly-url>
HOW TO RUN GENERATOR LOCALLY
Directly run from code rather than installing(dev-mode
)
- Run npm link command on your local to set your binary commands(eg: generate, generate-program etc.), which will point to local folder
- Start making changes in your generator code and try the commands again to run them with updated codes
Create local package instead of publishing it everytime to npmjs.com
npm pack //this will create a generator_poc-<version>.tgz file at current location
npm i -g generator_poc-2.0.3.tgz