I have a project that include a gulp task for building and packaging the sources and release in a directory called dist
. My goal is publish it as a npm package,
I highly recommend you to use .npmignore
instead of moving or copying things around, specially if you are using a CI for deployments, and just add there the files you don't want to publish.
https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package
Example:
#tests
test
coverage
#build tools
.travis.yml
.jenkins.yml
.codeclimate.yml
#linters
.jscsrc
.jshintrc
.eslintrc*
#editor settings
.idea
.editorconfig
If you want to split your code, into different npm packages using the same repo, I bumped into this project recently: Lerna and looks really good.
Maybe you should take a look