How to generate components?
npm run generate component-name
run this command for generating a component with all the required files
How to run the package locally without publishing?
Download the project
npm i
cd ./node_modules/react
npm link
Now, Go to the repository you want to download the package to.
npm i ../package-folder-name
(relative path to the package)npm link react
Now, run the your project. The package is installed and working.
.npmignore
will allow inside published package
To check what folders/files npm pack && tar -xvzf *.tgz && rm -rf package *.tgz
Rules:
- Do not use
rem
usepx
for css. - If a component is removed/deleted make sure to remove
it's export fromsrc/index.ts
as well. - Do not turn off tsconfig.json
strict
flag.