PolymerElements / generator-polymer-init-custom-build

A Polymer CLI generator for creating custom build processes with polymer-build
69 stars 42 forks source link

[support] .gitignore in 1.0.0 (PSK2)? #27

Open ElijahLynn opened 7 years ago

ElijahLynn commented 7 years ago

New to Polymer here. I used polymer init custom-build and I did not get a resulting .gitignore file that excluded /bower and /node_modules. I do see that I am using 1.0.0 of custom-build which points to the 2.0 tag of the Polymer Starter Kit. That tag does have the correct .gitignore file.

Why do I not automatically get the .gitignore in PSK 2.0?

ElijahLynn commented 7 years ago

Actually, it seems as if maybe it was intentional not to ship with a .gitignore since many will want to have their own overrides to that.

Even so I think maybe a .gitignore-suggested would be good if that's the case. Some confirmation on this would still be awesome!

chuckh commented 7 years ago

This is not intentional. For some reason Polymer CLI is not copying it. PSK2 has .gitignore included.

.gitignore (should include at least these lines)

bower_components/
build/
node_modules/
ElijahLynn commented 7 years ago

I wonder if we should move this to https://github.com/Polymer/polymer-cli.

Also, I am using v0.16.0 of polymer-cli.

robdodson commented 7 years ago

It may be related to this: https://github.com/yeoman/generator-polymer/blob/master/app/index.js#L60

I think when you npm install something with a .gitignore it renames it to .npmignore. Need to double check that's the case.

chuckh commented 7 years ago

It is still related to npm bug that renames .gitignore to .npmignore. See below.

image

stramel commented 7 years ago

As @robdodson was saying .gitignore does get renamed to .npmignore. There is a good conversation here https://github.com/npm/npm/issues/7252 but ultimately would need a work around from the sounds of it.