1.0.8 • Published 4 years ago

@tealink/ui-generators v1.0.8

Weekly downloads
31
License
ISC
Repository
-
Last release
4 years ago

@tealink/ui-generators

Global CLI generators for scaffolding ui based on https://plopjs.com/

NPM JavaScript Style Guide

Install

npm install --save-dev @tealink/ui-generators

Add the following scripts in package.json:

  "scripts": {
    "generate": "ui-generators",
    "g": "npm run generate"
  },

Generate!

npm run g c

Commands

Create component

npm run g c

or

npm run generate component

This will create a react functional component in /components folder and export it

Create page

npm run g p

or

npm run generate page

This will create a react functional component including portals in /pages folder and export it. It will also generate a navigation entrance in the sidebar and add routing.

Create sub-page

npm run g sp

or

npm run generate subpage

This will create a react functional component in /pages/ROOT/ folder and export it, where root is an already exisiting page. It will also add routing under /ROOT/name.

Create hook

npm run g h

or

npm run generate hook

Creates a hook in /hooks folder

Create service

npm run g s

or

npm run generate service

Creates a service in /services folder

Development

cd example
npm install ../
npm run g c

Publish

By versioning the library, it will automatically be pushed to your remote branch. The library is published automatically to npm when merged to master.

npm version patch
1.0.8

4 years ago

1.0.6

4 years ago

1.0.7

4 years ago

1.0.5

4 years ago

1.0.2

4 years ago