Closed vesper8 closed 5 years ago
default .gitignore from vue cli app has already
node_modules
so no need to add a second node_modules in the .gitignore...
The folder is not ignored because of package.json, package-lock.json, (these are needed for the cordova plugins), config.xml, build.json, google-services.json, GoogleService-Info.plist and other files, which you add or modifiy in cordova i.e.
Hrmm.. that is odd. I do have
node_modules
In my .gitignore file, but that somehow doesn't apply to the node_modules folder inside src-cordova
I have to add it explicitly like so
/src-cordova/node_modules
You're saying it works for you ?
Yea I wasn't implying the whole src-cordova file should be ignored, I understand there are required files and folders in there
which operating system are you running ? are you sure you have
node_modules
and not i.e.
./node_modules
and which git version
A leading "**" followed by a slash means match in all directories. For example, "**/foo" matches file or directory "foo" anywhere, the same as pattern "foo".
So a simple
node_modules
should ignore node_modules anywhere....
PS: Once you added the files to git, .gitignore is not applied to the already added files... so maybe check if you did not screw up, and take a look if
vue create testapp
cd testapp
vue add cordova
npm install
is doing the same...
oops.. my bad.. I've installed this plugin to two of my repos, the one who's .gitignore I checked had 'node_modules' without a leading slash. But the one who I just installed it to and was having a problem did in fact have a leading slash before node_modules
totally my fault.. sorry for the time and confusion.. thanks for the replies
no problem...
That's a pretty big folder, ~18mb and almost 3000 files.. pretty big folder to be checked into a repo
And the root of src-cordova does contain a package.json
Is there a reason why this folder is not ignored, couldn't we just run yarn/npm to get those dependencies?