generator-polymer-init-custom-build icon indicating copy to clipboard operation
generator-polymer-init-custom-build copied to clipboard

[support] .gitignore in 1.0.0 (PSK2)?

Open ElijahLynn opened this issue 8 years ago • 6 comments

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 avatar Aug 29 '16 02:08 ElijahLynn

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!

ElijahLynn avatar Aug 29 '16 02:08 ElijahLynn

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/

chuckh avatar Aug 30 '16 13:08 chuckh

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

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

ElijahLynn avatar Aug 30 '16 19:08 ElijahLynn

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.

robdodson avatar Aug 30 '16 21:08 robdodson

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

image

chuckh avatar Sep 01 '16 04:09 chuckh

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.

stramel avatar Nov 02 '16 11:11 stramel