New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rexlabs/plz-cli

Package Overview
Dependencies
Maintainers
15
Versions
191
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rexlabs/plz-cli

Toolkit for generating, building & testing packages.

  • 1.13.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
104
decreased by-70.79%
Maintainers
15
Weekly downloads
 
Created
Source

plz cli

Toolkit for generating, building & testing packages.

Specifically, it consolidates:

  1. Generating new packages & apps.
  2. Configuring build pipelines. eg. Webpack, Babel
  3. Configuring and running unit & integration tests. eg. Jest + Babel
  4. Starting a development server for UI components & Apps.

Usage

$ plz <command> [options]

# CLI help
$ plz help

# Usage for individual commands
$ plz help <command>

Commands

create <name> [--root-path=<pwd>] [--type=<react-component>]

Generates a package called @rexsoftware/<name>.

Uses scaffold templates found in templates/. Defaults to react-component template.

Can create:

  • react-component
  • react-app
  • module
test [options]

Starts a test runner in current directory.

Uses the jest test runner.

stories

Starts a storybook for UI components.

Uses the storybook tool.

build

Bundles the package/app for distribution.

Uses the nwb toolkit.

serve

Starts a demo for UI components, or a dev server for an App.

Uses the nwb toolkit.

clean

Removes previous build files.

Uses the nwb toolkit.

help

Shows the help message.

Rationale

The CLI is largely a facade around other tools:

  • nwb, by insin (module bundler)
  • jest, by facebook (test runner)
  • storybook, by kadira (ui testing environment)

But, by creating a facade around these tools we can:

  • Avoid forcing developer to learn & remember individual tools until they're required to.
  • Replace the tools without changing the front-facing API of plz cli
  • Optimise package's output over time, without costly refactors in every package

Developing

Modifying dependencies!

Dependencies are managed are the root of the project by lerna.

  1. Add/remove a dependency in package.json manually
  2. In the root of heidi, run yarn install-deps

Structure

Start by looking into index.js.

The bulk of logic are in the individal command files, in src/commands/. Commands can follow different code paths for different package types.

Configuration for the internal tools can be found under src/configs/.

Testing

# Watch for changes, rerunning tests
$ yarn test

# Run watch once
$ yarn test:once
# Prints the name given to the cli 'bin' in package.json
node ./support/generate-ascii-logo.js

FAQs

Package last updated on 20 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc