npm install git repository without package.json

后端 未结 3 1485
无人共我
无人共我 2020-12-28 13:20

I have a project that depends on several third-party libs.

My package.json looks like:

\"dependencies\": {
    \"vendor-name\": \"git://github.com/ve         


        
相关标签:
3条回答
  • 2020-12-28 13:44

    Yes you can with this package: https://npmjs.org/package/napa

    0 讨论(0)
  • 2020-12-28 13:47

    What napa do seems to be overengineered. I think just adding install script into the package.json is enough for you.

    "scripts": {
        "install": "git clone https://github.com/vendor/name.git -b v1.1 node_modules/name"
    }
    
    0 讨论(0)
  • 2020-12-28 13:50

    no that is not possible according to the npm documentation

    0 讨论(0)
提交回复
热议问题