@tealink/ui-generators

1.0.8 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @tealink/ui-generators

Weekly Downloads

58

Version

1.0.8

License

ISC

Unpacked Size

120 kB

Total Files

25

Last publish

Collaborators

  • jakobgn