Add support for DOTFILES_PATH environment variable#5039
Add support for DOTFILES_PATH environment variable#5039FezVrasta wants to merge 1 commit intobabel:masterfrom
Conversation
The purpose of this edit is to provide a commonly accepted environment variable used by the JavaScript/npm scripts where to look for their dotfiles (config files). This is an attempt to resolve the problem with the high number of "dotfiles" stored in the root directory of the projects.
Current coverage is 89.15% (diff: 100%)@@ master #5039 diff @@
==========================================
Files 203 203
Lines 9821 9822 +1
Methods 1072 1072
Messages 0 0
Branches 2614 2615 +1
==========================================
+ Hits 8756 8757 +1
Misses 1065 1065
Partials 0 0
|
I agree, but in my case I don't care because they aren't visibile by default (Vim or whatever). if you setup a custom directory to store all of your dotfiles, wouldn't be the same issue? Could you tell use more about your use case. |
|
So, if I have a If I have everything in the root directory, there will be a lot of configuration files put there, along with the structure of the repository and its folders (with maybe a Example: As you can see, they have 8 config files in the root folder, along with the README, CONTRIBUTING etc. It would be much easier to read if they could put all the config files in a given folder, and leave in the root directory just the folders plus the various Edit in reply to your edit: |
|
It would be awesome to have a such common pattern! There are some project which aren't using "dotfiles". I think we could extend this to /cc @hzoo What do you think about this for Babel? |
|
@FezVrasta I looked at your discussion for this in eslint. Do you still want it for Babel or can I close this? I would suggest you to store your Babel configuration in your package.json. |
|
I still hope to get something like what I propose in the most common libraries. If not an environment variable, maybe a variable inside the I don't see |
|
Here is the documentation: https://babeljs.io/docs/usage/babelrc/#use-via-package-json |
|
@xtuc yup I'm aware of this option, I just don't think that it makes sense to use Especially because as you can see, adding a behavior like the one I'm suggesting is just few lines of code. |
|
I think we are going to defer doing this - not a common thing to do at the moment, but thanks for the PR! |
The purpose of this edit is to provide a commonly accepted environment variable used by the JavaScript/npm scripts where to look for their dotfiles (config files).
This is an attempt to resolve the problem with the high number of "dotfiles" stored in the root directory of the projects.
I don't expect this PR to be merged, but I wanted to raise attention to the problem and see if you have feedbacks.