foundryvtt-cli icon indicating copy to clipboard operation
foundryvtt-cli copied to clipboard

Default folder structure should be compatible with .gitignore

Open cstby opened this issue 2 years ago • 1 comments

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/

cstby avatar Apr 19 '24 07:04 cstby

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

ryanwalder avatar May 17 '24 13:05 ryanwalder

Options are provided if you wish to adjust the output directory to something other than the default.

Fyorl avatar May 13 '25 16:05 Fyorl