I would like to publish an npm package containing my source as well as distribution files. My Github repository contains the src folder that contains the JavaScript source files. The build process creates a dist folder containing distribution files. Of course, the dist folder is not checked in the Github repository.
How to publish npm package in such a way that when someone does npm install , they get src as well as dist folder? Currently, when I run npm publish from my git repository, it only results in src publishing.
My package.json looks like this:
{ "name": "join-js", "version": "0.0.1", "homepage": "https://github.com/archfirst/joinjs", "repository": { "type": "git", "url": "https://github.com/archfirst/joinjs.git" }, "main": "dist/index.js", "scripts": { "test": "gulp", "build": "gulp build", "prepublish": "npm run build" }, "dependencies": { ... }, "devDependencies": { ... } }
Naresh Jul 26 '15 at 10:14 2015-07-26 22:14
source share