Create and Publish packages to npm - React Component Library using tsdx

Bruno Antunes
Bruno Antunes
16.9 هزار بار بازدید - 3 سال پیش - This is the easiest and
This is the easiest and fastest way I know to create and publish a package to NPM. In this video we will publish a simple react component to NPM using tsdx, typescript and storybook.

We will also see how versions work and how to use "npm version".

At the end of the video we will consume our new published package from a new create-react-app project using typescript.

----
Published package: https://www.npmjs.com/package/@bmvant...
All my packages: https://www.npmjs.com/~bmvantunes
----

Timeline
00:00 Introduction
00:15 Example: why you may need to publish packages
01:00 Show tsdx documentation
01:48 Check package name and Create npm account
02:18 npm login
02:26 Create our component library using tsdx
04:40 Change name to scoped package
05:00 npm publish and npm publish --access public
06:12 See published package on npmjs.com
06:43 npm version - change the version of your package
09:15 Add a new component
10:38 Named exports vs Default exports
12:03 Is it possible to automate all this?
12:45 Consume our package in a new create-react-app project

----
Follow me on:
Twitter: Twitter: bmvantunes
Dev.to: https://dev.to/bmvantunes
Website: https://brunoantunes.net
GitHub: https://github.com/bmvantunes
LinkedIn: LinkedIn: bmvantunes
3 سال پیش در تاریخ 1400/02/15 منتشر شده است.
16,908 بـار بازدید شده
... بیشتر