ManderaGeneral / generalpackager

Tools to interface GitHub, PyPI, NPM and local modules / repos. Used for generating files to keep projects dry and synced. Tailored for ManderaGeneral for now.
https://pypi.org/project/generalpackager/
Apache License 2.0
0 stars 0 forks source link

Install node package as editable #15

Closed Mandera closed 1 year ago

Mandera commented 1 year ago
Mandera commented 1 year ago

Comparing commands

npm install ./name and npm link ./name --save pip list

repos@ C:\Python\general\repos
`-- genvector@0.0.2 -> .\genvector

npm link ./name pip list

C:\Python\general\repos
+-- @babel/code-frame@7.18.6 extraneous
+-- @babel/helper-validator-identifier@7.19.1 extraneous
+-- @babel/highlight@7.18.6 extraneous

...

+-- genvector@0.0.2 extraneous -> .\genvector

Summary

Mandera commented 1 year ago

Calling npm install / link name and name exists in cwd will install that local package, but not it's dependencies?? Cannot find why that is. Let's stick with npm install / link ./name

Mandera commented 1 year ago

npm install C:\Python\general\repos\genvector becomes '-- genvector@0.0.2 -> .\genvector so we don't need to bother with prefixing relative paths with ./ which would only work when node_modules was above the package anyway

Mandera commented 1 year ago

All this testing was done on v16, updated to v18 now - Also removed the scope warning

Mandera commented 1 year ago

https://github.com/ManderaGeneral/generalpackager/commit/16102d899b0ed6047933bcdfa0a639ae4d3474bb