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

Feature: Copy/Link file trees #269

Open
sciurius opened this issue Jul 15, 2020 · 2 comments
Open

Feature: Copy/Link file trees #269

sciurius opened this issue Jul 15, 2020 · 2 comments

Comments

@sciurius
Copy link
Contributor

Currently, the ttree copy and link settings specify patterns to be matched against the file basenames. I would like to extend this to path names.

Rationale: Often a site has a bunch of static information (images, documents, js, ...) that always must be copied as-is. It is conventional to put these in a folder 'assets'. To specify to ttree that this folder must be copied as-is, a config command

copy = ^assets/

would be appropriate,
To accomplish this, apply the attached trivial patch. Chances of breaking existing configs are minimal.

Alternatively a new setting assets could be introduced to specify one or more folders that always must be copied as-is.

If we can agree on an approach I offer to provide implementation PRs.

@atoomic
Copy link
Collaborator

atoomic commented Jul 15, 2020

Why not using a different keyword like copy_dir?
This way we would reduce the risk of introducing a regression on existing usages of copy and make the intent clear, that this is a directory you want to copy?

@sciurius
Copy link
Contributor Author

sciurius commented Jul 15, 2020

Yes, that's what i meant (intended to mean) when I proposed assets (I called it a setting but I meant keyword).
Ideally, copying would still be subject to the link settings, mainly to prevent long copy times and disk use during development.

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