Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create source tarball release of package with npm without publishing it

I want to make source tarball release of npm package without publishing it, something similar as in python:

python setup.py sdist

I want to also specify which files to include, something similar like MANIFEST.in file in python.

I know i can publish package to npm and that creates tarball, but this is my private project and i don't want to have it published.

like image 650
offlinehacker Avatar asked Mar 26 '14 14:03

offlinehacker


1 Answers

If no arguments are supplied, then npm packs the current package folder.

there is npm pack which packs the current directory, but there is no command to specify files to include, instead of doing that specify .npmignore to ignore files that you don't want inside the package.

also set private:true to package.json to prevent npm from publishing the package.

like image 78
Gntem Avatar answered Oct 04 '22 18:10

Gntem