Coder Social home page Coder Social logo

Comments (9)

silverwind avatar silverwind commented on June 28, 2024 1

Examples (The values in the 2nd file are placeholder, not sure if git like them like that):

.gitconfig
.gitconfig.local

how about if we make that optional?

git parses included files by default, so I think this module should do. I'd see some value in having a option to disable parsing them, so a option to disable might make sense.

from parse-git-config.

jonschlinkert avatar jonschlinkert commented on June 28, 2024 1

done, published and released as 2.0.

I attempted to trick the parser with conflicting options in the included file, but my testing showed that it parses conflicts exactly like git does. Nice work!

Thanks! I implemented the logic to follow the spec described in the link you provided, so that the config properties would be merged in the correct order. Glad it worked!

from parse-git-config.

jonschlinkert avatar jonschlinkert commented on June 28, 2024

To clarify, you want the parsed object to include other the other git configs (which are specified using include)? I like the idea, how about if we make that optional?

edit: could you paste an example of the configs you use (obviously with fake information) so that I can use that for unit tests? thanks!

from parse-git-config.

jonschlinkert avatar jonschlinkert commented on June 28, 2024

perfect! thanks!

edit:

git parses included files by default, so I think this module should do. I'd see some value in having a option to disable parsing them, so a option to disable might make sense.

True, but this module probably shouldn't follow the same rules, given that it's more likely that private information could be accidentally included and shared.

from parse-git-config.

silverwind avatar silverwind commented on June 28, 2024

Sure, I'm fine with a opt-in too.

from parse-git-config.

jonschlinkert avatar jonschlinkert commented on June 28, 2024

I just pushed up a branch if you'd like to test it locally before I publish tomorrow.

edit: actually let me update a few things, then I'll ping you here again

from parse-git-config.

jonschlinkert avatar jonschlinkert commented on June 28, 2024

k, I pushed up more changes. I'll add a changelog with more details, but in summary:

  • adds promise support
  • adds support for include
  • renamed .keys method name to .expandKeys

from parse-git-config.

silverwind avatar silverwind commented on June 28, 2024

Looking good. During testing, I attempted to trick the parser with conflicting options in the included file, but my testing showed that it parses conflicts exactly like git does. Nice work!

from parse-git-config.

jonschlinkert avatar jonschlinkert commented on June 28, 2024

Sorry, I completely forgot to come back and merge! I made the mistake of viewing this on my phone, then it disappeared from my new issues list, so I didn't see it when I logged on. publishing now!

from parse-git-config.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.