How can I specify in my package.json to only download one file or folder from a repo, rather than the whole thing?

Viewed 261

I have a collection of small reusable scripts, stored as separate files in a single repo.

Is there a way I can use one of the scripts in a different project, without forcing it download the whole project?

npm install https://github.com/skeddles/test/blob/master/test2/index.js

npm ERR! code ENOPACKAGEJSON

npm ERR! package.json Non-registry package missing package.json: https://github.com/skeddles/test/blob/master/test2/index.js.

npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! A complete log of this run can be found in:

npm ERR! C:\Users\Sisters of Satan\AppData\Roaming\npm-cache_logs\2021-07-29T19_08_48_510Z-debug.log

0 Answers
Related