@slayre/componentify

Extract Reusable Components from Existing React Project

Usage no npm install needed!

<script type="module">
  import slayreComponentify from 'https://cdn.skypack.dev/@slayre/componentify';
</script>

README

componentify

Extract Reusable Components from existing React Project.

Getting Started

  • Inside your root folder run this command
$ npx componentify-init components/ReusableComponent -p=@slayre/componentify
  • Change the contents of src/components/ReusableComponent/src/index.js to import the component you want to extract and export it.
export { default } from 'pathtocomponent';
  • Build it. Make sure you are in ReusableComponent's dir.
yarn build
  • Publish It.