Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding custom gitignore files too #9

Open
karan opened this issue Jan 13, 2015 · 14 comments
Open

Consider adding custom gitignore files too #9

karan opened this issue Jan 13, 2015 · 14 comments
Milestone

Comments

@karan
Copy link
Owner

karan commented Jan 13, 2015

Maybe platform specific?

Mac needs to have .DS_Store for example. Some cloud platforms have their own files that need to be ignored. Editors have some (like #3).

How should be structure this?

I'm thinking this:

joe/
---- data/
-------- gitignore/    # submodule from github/gitignore
-------- custom/      # our own custom files

Seems good? Anyone have a good list of such files we can add?

@munrocape
Copy link
Contributor

#10 Doesn't organize the directory. Will rearrange that momentarily. I would appreciate any feedback on the new code to handle fetching the .gitignore file.

@munrocape
Copy link
Contributor

Looking at the PRs for github/gitignore, it looks quite active as well as has a high quality barrier. It may be best to let them have to deal with vetting *.gitignore files as they require proof in the PR.

I think it would be easier to remove the current submodule and re-add it with the new directory path as opposed to moving the current submodule.

@karan
Copy link
Owner Author

karan commented Jan 13, 2015

Yup that sounds like a good plan. Let's do that after #10 is merged.

Left some notes on the PR.

@munrocape
Copy link
Contributor

The directory structure looks good.

Perhaps two new commands should be added - add and remove.
joe add <name> (<path> | [TEXT...])
joe remove <name>

These will copy and subsequently remove a .gitignore file.
Name cannot exist already in the data/ folder and you can only remove custom gitignore's. <path> is the path to the a .gitignore file. Perhaps alternatively a user could just list off what they want ignored and do not have to create an intermediate file.

@karan
Copy link
Owner Author

karan commented Jan 19, 2015

I like that idea. I'm worried about custom data and updates. If we use the now-used data/ folder, then any time the user updates joe, all data will be wiped. We might need to add platform-specific code for this.

Linux data goes in /usr/share, Win in \ProgramData, Mac OS X in /Library/Application Support.

@filipekiss
Copy link

How about a folder just for custom data. When you run joe something it looks in the custom folder first. If not found, look in the defaults ignores and fails otherwise. This way we could "overwrite" the default definitions and nothing would be affected during updates...

@munrocape
Copy link
Contributor

@filipekiss I think the issue is when updating via a package manager this folder would be overridden. As a result, it would need to be stored anywhere but joe/ as it would be deleted upon update.

I may be wrong, though.

@filipekiss
Copy link

@munrocape I'm not sure about Windows, but for Linux and OS X maybe create a $HOME/.joe folder where custom data and settings would be stored. This way package managers would not override stuff when updating Joe itself.

@munrocape
Copy link
Contributor

That's what @karan listed - the customary/predictable locations for each OS where data like this can be stored.

I'll publish a branch later tonight regarding this if you want to check it out.

Sent from my iPhone

On Jan 20, 2015, at 4:00 PM, Filipe notifications@github.com wrote:

@munrocape I'm not sure about Windows, but for Linux and OS X maybe create a $HOME/.joe folder where custom data and settings would be stored. This way package managers would not override stuff when updating Joe itself.


Reply to this email directly or view it on GitHub.

@filipekiss
Copy link

Great! I'll take a look, for sure. :D


Enviado de um iCoiso

On Tue, Jan 20, 2015 at 6:10 PM, Zach Munro-Cape notifications@github.com
wrote:

That's what @karan listed - the customary/predictable locations for each OS where data like this can be stored.
I'll publish a branch later tonight regarding this if you want to check it out.
Sent from my iPhone

On Jan 20, 2015, at 4:00 PM, Filipe notifications@github.com wrote:

@munrocape I'm not sure about Windows, but for Linux and OS X maybe create a $HOME/.joe folder where custom data and settings would be stored. This way package managers would not override stuff when updating Joe itself.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub:
#9 (comment)

@KangOl KangOl mentioned this issue Jan 22, 2015
@karan
Copy link
Owner Author

karan commented Jan 22, 2015

Seems like @filipekiss worked on it. Will wait for a PR.

@munrocape
Copy link
Contributor

Yeah, @filipekiss saw it through to completion :shipit:

Sent from my iPhone

On Jan 22, 2015, at 12:03 PM, Karan Goel notifications@github.com wrote:

Seems like @filipekiss worked on it. Will wait for a PR.


Reply to this email directly or view it on GitHub.

@karan
Copy link
Owner Author

karan commented Jan 23, 2015

New idea.

We move all files to a platform-specific folder: something like ~/.share/joe or something like that. We can have the gitignore repo there, and custom files.

@filipekiss
Copy link

What do you think about ~/.joe/data/default and ~/.joe/data/custom to store the data we'll be using and, if we ever need, we can also add ~/.joe/settings there. This way will keep everything related to joe namespaced and won't risk messing some other app files.

@karan karan modified the milestone: v0.1.0 Feb 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants