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

Default folder structure should be compatible with .gitignore #47

Open
cstby opened this issue Apr 19, 2024 · 1 comment
Open

Default folder structure should be compatible with .gitignore #47

cstby opened this issue Apr 19, 2024 · 1 comment

Comments

@cstby
Copy link

cstby commented Apr 19, 2024

Problem

I'm using this CLI to put my compendiums under version control. Currently, this module packs and unpacks compendiums to /packs/compendium/_source. Afaik, it's not possible to create a .gitignore file that includes only the nested _source subdirectories and excludes the rest of the files.

Suggested Solution

The DND5e system solves this problem by using a different folder structure: /packs/_source/compendium. This allows them to easily version control the desired files by adding the following lines to .gitignore:

packs/*
!packs/_source/
@ryanwalder
Copy link
Contributor

ryanwalder commented May 17, 2024

You should be able to use this to ignore any nested _source dirs:

packs/*/_source

With the following dir structure it would ignore all _source dirs while keeping any files/dirs:

packs/foo/_source # ignored
packs/foo/one.json
packs/foo/two.json
packs/foo/three.json
packs/bar/_source # ignored
packs/bar/one.json
packs/bar/two.json
packs/bar/three.json
packs/baz/_source # ignored
packs/baz/one.json
packs/baz/two.json
packs/baz/three.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants