Short example How to Build and Publish your NPM package
Sometimes, you need to make some npm packages.
And, in some cases it could be a little bit difficult, to understand how to setup it.
How to setup the Travis test, build, deploy.
Which files should be in the files
section in the package.json
and etc.
That tiny packages will help you to understand how it works.
You able to clone it and setup as you need and it will work.
The packages very small.
It means that they do not include some things, it could be some tests, configs, etc.
The Philosophy is - this is very small clean packages to basic setup your package.
The supported features in the packages.
- Travis config
- Eslint config
- unit/e2e tests
The repositories with package examples.
Please clone it and configure as you need.
- Clean JS
- Clean JS + Parcel
- Clean JS + Webpack
- Clean TypeScript
- Clean Vue
- Clean React
- Vue + vue-cli
- Vue + TypeScript
- React + create-react-app
- React + TypeScript
The package repos are ready packages for usage.
So, you can just copy any of them. See Packages.
Copy any of the Implemented packages from a repo.
git clone git@github.com:edtoken/clean-react-typescript-pkg.git
Update the .travis.yml
file, replace the email
and repo
Update name
, description
, repository
, author
, and licenses
To able, to deploy the npm package from the travis
you should update the travis environment.
Please add NPM_TOKEN
key.