Hi all,

some ES/typescript package are complex to build and need a lot of node_modules links. I built a new tool to help named pkgjs-install-minimal (0.14.28):
 * Unlike pkgjs-install, it has no particular dependency and is included
   in dh-nodejs (dh-sequence-nodejs) so can be used during build
 * it links (or copy if --copy) all needed dependencies found in
   package.json into node_modules (of course if they are available in
   Debian directories)
 * --prod option skip devDependencies
 * --copy option copies recursively all needed dependencies. Not needed
   when using links because "import" and typescript are able to follow
   /usr/share/node_modules link

Example with node-abab:
$ pkgjs-install-minimal && ls -l node_modules
total 0
lrwxrwxrwx eslint -> /usr/share/nodejs/eslint
lrwxrwxrwx mocha -> /usr/share/nodejs/mocha
lrwxrwxrwx webpack -> /usr/share/nodejs/webpack

$ pkgjs-install-minimal --copy && ls node_modules
acorn-import-assertions     jest-worker
acorn-jsx                   jsonify
ajv                         json-parse-better-errors
ajv-keywords                json-schema-traverse
ansi-colors                 json-stable-stringify
ansi-escapes                js-yaml
ansi-regex                  levn
ansi-styles                 loader-runner
anymatch                    locate-path
argparse                    lodash
balanced-match              log-symbols
base64-js                   lru-cache
binary-extensions           merge-stream
[...]

Hope this will help... At least this will simplify node-babel7 build.

Cheers,
Yadd

--
Pkg-javascript-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to