Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wethegit/components-cli

Package Overview
Dependencies
Maintainers
0
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wethegit/components-cli

CLI companion for `@wethegit/components`. It allows you to initialize and add components to a project.

  • 4.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
48
decreased by-34.25%
Maintainers
0
Weekly downloads
 
Created
Source

@wethegit/components-cli

CLI companion for @wethegit/components. It allows you to initialize and add components to a project.

For how to use the components in your project, see the Documentation.

To learn how to contribute, continue reading.

Developing

Make sure you using the required Node version from nvmrc.

  1. Run yarn install from the root of the monorepo, not from this package's directory.
  2. cd into this package's directory and run yarn start
  3. In another terminal run npm link from this package's directory. Note: it MUST be npm link and not yarn link

Now that we have a local version of the package available we need a node project to test on. If you have one already, skip to step 3.

  1. Create a new directory and cd into it.
  2. Run yarn init -y
  3. Run npm link @wethegit/components-cli

You should now be able to run npx @wethegit/components-cli init/add from the command line.

Adding new category of registry items

If you'd like to add a new category of registry item, you need to:

  1. Add a new category to RegistryCategory
  2. Set the source directory for the new category in consts

Those are the basic steps. If this new category require a new directory as destination from the user, we also need to set that up in the config:

  1. Add a new property to Config and update DEFAULT_CONFIG
  2. Resolve the path during config parsing in resolveConfigPath
  3. Prompt the user for the new path in promptForConfig

That's the gist of it. If there are any other places that need tweaking, Typescript will let you know.

Building

tsup compiles src/index.ts, into a CommonJS format as well as their TypeScript types.

Run yarn build to confirm compilation is working correctly. You should see a folder wethegit-components-cli/dist which contains the compiled output.

wethegit-components
└── dist
    ├── index.d.ts  <-- Types
    └── index.js    <-- CommonJS version

FAQs

Package last updated on 03 Oct 2024

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