Should I publish module source code in npm?

Hope this question is not too stubborn, I ask about the best / usual practice for this.

I am publishing an npm module written in ES6 and translated into ES5 and UMD using babel and rollup .

The file structure can be summarized as follows:

/coverage/
/dist/
/node_modules/
/src/
/test/
/tools/
.editorconfig
.eslintrc
.gitattributes
.gitignore
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
LICENSE.txt
package.json
README.md

Source code is within /src/and compiled code in /dist/.
These dir are .gitignored:

  • Coverage
  • dist
  • node_modules

What the user really used is really content /dist/.

I used the starter kit with the build process, which:

  • takes the original package.json
  • removes all scripts and associated fields from it.
  • copies it to dist
  • LICENSE README dist ()

GitHub, , npm:

A) ( /coverage/ /node_modules/) package.json, dist

B) dist package.json README LICENSE. , /dist .

?

+6
1

, npm, transpilation/minification/etc. , .

Node ( npm , , ), , ( , ) dist .

dist , , , dist , npm version npm publish.

, , Node Node. , , , - .

, . , - , , , , , - , . , , , ( ).

0

Source: https://habr.com/ru/post/1016764/


All Articles