The devDependencies section of npm\'s package.json documentation says to list your test dependencies there so that users of your package don\'t have to pull down extra dependenc
Another approach is to use a lib
folder and store everything in there. Then you can configure your package.json
to consider only that folder.
In order to work you need also to move your main file inside lib
and specify it in the package.json
. See example below:
{
"name": "your-package",
"main": "./lib/index.js",
"files": [
"/lib"
]
}
More info are available on this nice article