@sarnyaia1/aenscomp-lib
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

Create React Library project 1

Log in npm

npm login

Create base project with storybook

  • Create project:
npx tsdx create my-project
  • Choose template : react-with-storybook

  • Test the storybook:

npm run storybook

Publish the npm project

  • Change the package name (package.json)

  • Publish the package:

npm publish --acces public

Update the library

  • Change index.tsx (src/index.tsx)

  • Make some comment and refresh version (major,minor,patch)

npm version minor -m "I am updating the library"
  • Publish again:
npm publish --acces public

Testing the created library

  • Create a new react project:
yarn create react-app testproject
  • Add the new library:
yarn add @sarnyaia1/aenscomp-lib
  • Import the component to the App.js
import { Testcomponent } from '@sarnyaia1/aenscomp-lib';


<Testcomponent yourName="Adam" />
  • Runt the project:
yarn start

Result

This is a screenshot

Readme

Keywords

none

Package Sidebar

Install

npm i @sarnyaia1/aenscomp-lib

Weekly Downloads

0

Version

1.2.0

License

MIT

Unpacked Size

1.8 MB

Total Files

29

Last publish

Collaborators

  • sarnyaia1