Skip to content

Juanestban/luna-cli

Repository files navigation

lun-cli

new package for created a specified react component using typescript or javascript

install

with npm

npm install lun-cli

with yarn

yarn add lun-cli

with pnpm

pnpm add lun-cli

commands

created component schema

lun-cli gc <component-name>

create page/view schema

lun-cli gp <view-name>

create context/provider schema

lun-cli gctx <provider-name>

help command

### short way
lun-cli -h

### large way
lun-cli --help

flags:

by default that flag will be like "react" (react javascript)

  • -t
  • --template

examples

pnpm lun-cli <component> -t react-ts
pnpm lun-cli <component> --template react

defineLunConfig and lun.config.cjs file

you can create a file for define by default the config for use lun-cli for generate components, views|pages and contexts|providers

const { defineLunConfig } = require('lun-cli');

module.exports = defineLunConfig({
  root: 'src',
  pagesFolder: 'views',
  defaultTemplate: 'react-ts',
  provider: 'context',
  css: 'module',
  className: 'clsx'
});