npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

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

Steps for package publishing

  • npm version patch => To set new version for the package. Click here to learn more about versioning
  • npm publish => To publish the package to npmjs.com