News for hackers. Stuff that matters.
Re:NPMprune: Remove unnecessary files from node_modules to o... by josephg on Wednesday November 29, 2023 @03:02PM (#38464481)
Yep. And if you’re writing typescript, please include type definitions, source maps, type definition source maps and the original typescript source.

Having all of this stuff makes it possible to ctrl+click on functions in my libraries and read the corresponding source code. That’s a godsend during development - well worth a few extra kb of files in the npm module.

tsconfig.json:

    "declaration": true,
    "declarationMap": true,
    "sourceMap": true,
    ...
package.json (assuming typescript compiles src/ to dist/):

    "files": [
      "dist/*",
      "src/*"
    ],
Re:NPMprune: Remove unnecessary files from node_modules to o... by shepherdjerred on Wednesday November 29, 2023 @03:23PM (#38464752)
It makes me wonder why these are even configurable. These should all be emitted by default.