@anthood/crc
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

Standalone Component maker

Helper to generate a publishable react component

Installation

npx @anthood/crc my-component

Follow instruction and provide

  • NPM Package name
  • Github URL (not required from NPM but would be nice if you have a public repo)
  • Author name
  • Author email
  • Keywords (so that people find your package)
cd my-component
pnpm install

Your component is ready to be worked with and published!

Usage

Spins up a React 18 environment to develop on your component

pnpm dev 

Under the components you will find a prepolated starter component

  • /my-component
    • /src
      • /components
        • MyComponent.tsx

This is the entrypoint to what will be published on npm.

Publish

When you are ready make sure to first build, then publish (provided you have an NPM account).

If needed bump your versions inside package.json, and replace the Readme.md

pnpm build
pnpm publish --access=public

Importing into a project

Now you are set in any React project simply

import { MyComponent } from "my-component"

function App() {
    return <MyComponent />
}

Package Sidebar

Install

npm i @anthood/crc

Homepage

anthood.com

Weekly Downloads

5

Version

0.0.5

License

MIT

Unpacked Size

10.5 kB

Total Files

5

Last publish

Collaborators

  • anthood