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

@orgware/ow-cli

v1.1.2

Published

Command generator utility for Orgware's React projects

Downloads

38

Readme

OwCli command line React generator

This command generator utility is used by Orgware's React developers.

It is responsible for generating different React elements:

  • app
  • assets
  • components
  • pages
  • layouts
  • forms
  • states
  • utility functions
  • hooks
  • routes

Installation

The utility is published as a npm package. You can install it with the following command in terminal:

npm install -g @orgware/ow-cli

Installation in develop mode

You can install it with development mode. In this case, you should cone its repository.

git clone [email protected]:OrgwareHQ/OcCliTS.git <target-directory>
cd <target-directory>
npm install
npm run dev

And in an other terminal:

npm link

Usage

The main usage is:

ow-cli <command> <options>

The utility has own help system.

ow-cli help
Usage: ow-cli <command> [options]

Command line generator for OrgwareConnectTS

Options:
  -V, --version        output the version number
  -h, --help           display help for command

Commands:
  app [options]        Generate a React app
  asset [options]      Generate a new asset
  component [options]  Generate a new component
  form [options]       Generate a new form
  page [options]       Generate a new page
  layout [options]     Generate a new layout
  hook [options]       Generate a new custom hook
  route [options]      Generate a new route
  state [options]      Generate a new state
  util [options]       Generate a new utility function
  help [command]       display help for command

Naming conventions

The utility use kebab case format for all command and options. The generators convert these kebab case params to approprite format. Example:

ow-cli component -m my-time -n pie-chart

Modules

The generated code architecture is modular. Every item is generated in a module.

There is a main module named ow. We use it for those lements, which are used by other modules. If a module is also used by other applications, we create it the Orgware's common React library.

Commands

App generator

Usage: ow-cli app -n <name> -d

Generate a React app

Options:
  -n, --name <name>  Item name
  -d, --directory    Create app directory
  -h, --help         display help for command

Asset generator

Usage: ow-cli asset -m <module> -n <name>

Generate a new asset

Options:
  -m, --module <module>  Module name
  -n, --name <name>      Item name
  -h, --help             display help for command

Component generator

Usage: ow-cli component -m <module> -n <name>

Generate a new component

Options:
  -m, --module <module>  Module name
  -n, --name <name>      Item name
  -h, --help             display help for command

Form generator

Usage: ow-cli form -m <module> -n <name>

Generate a new form

Options:
  -m, --module <module>  Module name
  -n, --name <name>      Item name
  -h, --help             display help for command

Page generator

Usage: ow-cli page -m <module> -n <name>

Generate a new page

Options:
  -m, --module <module>  Module name
  -n, --name <name>      Item name
  -h, --help             display help for command

Layout generator

Usage: ow-cli layout -m <module> -n <name>

Generate a new layout

Options:
  -m, --module <module>  Module name
  -n, --name <name>      Item name
  -h, --help             display help for command

Custom hook generator

Usage: ow-cli hook -m <module> -n <name>

Generate a new custom hook

Options:
  -m, --module <module>  Module name
  -n, --name <name>      Item name
  -h, --help             display help for command

Route generator

Usage: ow-cli route -m <module> -n <name>

Generate a new route

Options:
  -m, --module <module>  Module name
  -n, --name <name>      Item name
  -h, --help             display help for command

State generator

Usage: ow-cli state -m <module> -n <name> -p

Generate a new state

Options:
  -m, --module <module>  Module name
  -n, --name <name>      Item name
  -p, --persist          Persist state
  -h, --help             display help for command

Utility function generator

Usage: ow-cli util -m <module> -n <name>

Generate a new utility function

Options:
  -m, --module <module>  Module name
  -n, --name <name>      Item name
  -h, --help             display help for command