'Angular + Git - How to Include a file from a package exists inside node_modules
I have ng-payment-card package and I've made some modifications in a file inside the package, and I need to include this file in the git commit in order to not reset it every time I make npm install.
I tried to write in .gitignore like this:
!/node_modules/ng-payment-card/__ivy_ngcc__/fesm2015/ng-payment-card.js
but the same, the file hasn't been added to the commit.
Solution 1:[1]
if you like to work with .gitignore
thats what you need to add to .gitignore
/*
!node_modules
node_modules/*
!node_modules/ng-payment-card
node_modules/ng-payment-card/*
!node_modules/ng-payment-card/ivy_ngcc
node_modules/ng-payment-card/ivy_ngcc/*
!node_modules/ng-payment-card/ivy_ngcc/fesm2015
node_modules/ng-payment-card/ivy_ngcc/fesm2015/*
!node_modules/ng-payment-card/ivy_ngcc/fesm2015/ng-payment-card.js
basically the problem is you have to allow access to all the sub directories to get to the last folder where the file is residing.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | amehmood |
