Skip to content

I think seed-element shouldn't advise ignoring .bowerrc #533

Description

@mco-gh

The http://www.polymer-project.org/docs/start/reusableelements.html doc prescribes this step:

Add .bowerrc to a .gitignore file so it doesn’t get checked in

This can be done using the echo command or a text editor

echo '.bowerrc' > .gitignore

I think this causes problems. Our component import paths are setup to use the prefix ../, rather than bower_components so if you ignore this .bowerrc setting, then next time you check out a component and run bower install, it will put everything in the bower_components dir, not the parent dir, and your import paths will not see the newly installed comps. So you end up with a working dir with some stuff in the parent and some stuff in a subdir. This is very confusing. I suggest leaving the .bowerrc file intact for seed-element and replacing this prescription with a block of text better explaining what's going on here and how any comp derived from seed-element is free to override or ignore .bowerrc per their desire, but let's make the simplest, default case just work.

If this issue is approved, I volunteer to write the text proposed above.

Activity

  1. robdodson commented on Jun 24, 2014

    @robdodson
    Contributor

    Instead of gitignoring it, we could add it to the ignore block in the bower.json

  2. mco-gh commented on Jun 24, 2014

    @mco-gh
    Author

    The point is that I don't think it should be ignored. I think it should be
    retained, for reasons outlined in the issue text.

    On Tue, Jun 24, 2014 at 5:02 PM, Rob Dodson notifications@github.com
    wrote:

    Instead of gitignoring it, we could add it to the ignore block in the
    bower.json

    —
    Reply to this email directly or view it on GitHub
    #533 (comment).

    Marc Cohen
    marccohen@google.com mco@google.com
    http://about.me/marc1

  3. robdodson commented on Jun 24, 2014

    @robdodson
    Contributor

    There's a difference between a gitignore and a bower.json ignore. I agree with you, we should keep it in the git repo.

    Adding it to the ignore block in bower.json just means that when a user runs bower install x-foo, they won't end up with a .bowerrc in their bower_components/x-foo dir. At that point, it would be useless because bower never checks a bower_components dir for .bowerrc files.

  4. mco-gh commented on Jun 24, 2014

    @mco-gh
    Author

    That seems reasonable. Let's see what Addy and Eric think (anyone else we
    should consult?). If they agree, I'll submit a PR undoing the gitignore
    instruction in the docs and add the ignore block to seed-element's
    bower.json.

    Thanks Rob!

    On Tue, Jun 24, 2014 at 7:27 PM, Rob Dodson notifications@github.com
    wrote:

    There's a difference between a gitignore and a bower.json ignore. I agree
    with you, we should keep it in the git repo.

    Adding it to the ignore block in bower.json just means that when a user
    runs bower install x-foo, they won't end up with a .bowerrc in their
    bower_components/x-foo dir. At that point, it would be useless because
    bower never checks a bower_components dir for .bowerrc files.

    —
    Reply to this email directly or view it on GitHub
    #533 (comment).

    Marc Cohen
    marccohen@google.com mco@google.com
    http://about.me/marc1

  5. robdodson commented on Jun 24, 2014

    @robdodson
    Contributor

    Yeah I think @ebidel and @addyosmani can weigh in. We're all slammed with I/O stuff at the moment but I want to give seed-element and the yeoman generator some more love next week.

  6. addyosmani commented on Jun 25, 2014

    @addyosmani
    Member

    There's a difference between a gitignore and a bower.json ignore. I agree with you, we should keep it in the git repo.

    I agree too.

    Adding it to the ignore block in bower.json just means that when a user runs bower install x-foo, they won't end up with a .bowerrc in their bower_components/x-foo

    I'm totally down for the ignore block being included in bower.json.

  7. robdodson commented on Jun 30, 2014

    @robdodson
    Contributor

    Moving discussion to seed-element repo.
    googlearchive/seed-element#18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions