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

@wethegit/components

Package Overview
Dependencies
Maintainers
0
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wethegit/components

For how to use the components, see the [Documentation](https://wethegit.github.io/component-library/).

  • 3.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
50
decreased by-29.58%
Maintainers
0
Weekly downloads
 
Created
Source

@wethegit/components

For how to use the components, see the Documentation.

To learn how to contribute, continue reading.

Developing

It's important to know that this library is never compiled. The source files are provided as is. They are meant to be copied into your project.

Make sure you using the required Node version from nvmrc.

You will develop and test the components with Storybook.

From the root of the repository, run:

yarn
yarn start

This will start Storybook and watch for changes in the components' source files.

Adding components

When adding a new file, ensure the component is also exported from the main src/components/index.tsx file:

// src/components/index.tsx
export * from "./button"

Export only the necessary pieces of the component and their types from the component's index.tsx file.

// src/components/button/index.tsx
export { Button } from "./button"
export type { ButtonProps } from "./button"

Dependencies

If your component requires node packages as dependencies, add them to the peerDependencies and devDependencies:

Run these command from this directory, not from the root, otherwise they will be dependencies to the whole monorepo.

First add as a peer dependency:

yarn add <package-name> -P

Then as a dev dependency:

yarn add <package-name> -D

Node dependencies and types

If a component is using a node package without types, add a declaration file with the name of the package, without special characters, to the ./types directory:

// ./types/<package-name>.d.ts
declare module "<package-name>"

🧩 You are not done yet!

After you have added your component and is ready to release it, you need to add it to the CLI.

Add an entry to registry-index.ts following the required types described in that file.

After that's all done you can release a new version following the instructions in the project's readme.

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