Skip to content

edtoken/build-and-publish-npm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build and publish your NPM package

stars

Short example How to Build and Publish your NPM package

Table of Contents

Motivation

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.

Supported Features

The supported features in the packages.

  • Travis config
  • Eslint config
  • unit/e2e tests

Implemented Packages

The repositories with package examples.
Please clone it and configure as you need.

Publish my own package step by step

The package repos are ready packages for usage.
So, you can just copy any of them. See Packages.

1. Copy the package

Copy any of the Implemented packages from a repo.

git clone git@github.com:edtoken/clean-react-typescript-pkg.git 
2. Update travis configuration

Update the .travis.yml file, replace the email and repo

3. Update package.json

Update name, description, repository, author, and licenses

4. Update travis environment, Add NPM_TOKEN value.

To able, to deploy the npm package from the travis
you should update the travis environment.
Please add NPM_TOKEN key.