Local dependency in package.json

后端 未结 12 1297
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 16:42

I want to do something like this, so npm install also installs the package.json of ../somelocallib or more importantly its dependencie

12条回答
  •  情歌与酒
    2020-11-22 17:21

    This is how you will add local dependencies:

    npm install file:src/assets/js/FILE_NAME

    Add it to package.json from NPM:

    npm install --save file:src/assets/js/FILE_NAME

    Directly add to package.json like this:

    ....
      "angular2-autosize": "1.0.1",
      "angular2-text-mask": "8.0.2", 
      "animate.css": "3.5.2",
      "LIBRARY_NAME": "file:src/assets/js/FILE_NAME"
    ....
    

提交回复
热议问题