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

Add support for :excludes, :includes and :target-path for resource-paths #1

Closed
m0smith opened this issue Dec 19, 2012 · 5 comments
Closed

Comments

@m0smith
Copy link
Owner

m0smith commented Dec 19, 2012

Support both
:resource-paths ["src-stencil"]

as well as

:resource-paths [ ["src-stencil" {:includes [#".html."]
:excludes [#".*~$"]
:target-path "target/html" }]]

The first is currently supported and needs to remain.

So each element of :resource-paths becomes either a string that is a project directory or
a vector of 2 elements. The first element is the project directory and the second is a map with 3 possible keys :include, :excludes and :target-path. Both :includes and :excludes are vectors of regular expressions. If only :includes is present, then only files that match at least one of the regular expression are included. If only the :excludes is present, then all files except those that match the regular expressions are included. If both are present then only files that match the :includes but do not match the :excludes will be included.

If :target-path is present, the files wioll be copied to his directory. If it is not preset, the :target-path in the main :resource map will be used.

The example given copies all files with "html" in the name except the emacs backup files (those ending in ~) to target/html/

@ghost ghost assigned m0smith Dec 19, 2012
@m0smith
Copy link
Owner Author

m0smith commented Dec 24, 2012

Added :target-path as well

@m0smith
Copy link
Owner Author

m0smith commented Dec 29, 2012

Added a plugin level for :includes and :excludes that all resource paths will see. Still need to add one for each resource path to override.

@m0smith
Copy link
Owner Author

m0smith commented Jan 4, 2013

I am going to leave this undone until either I need it or someone requests it. It is a bit pathological but might be nice in a few corner cases.

@charles-dyfis-net
Copy link

Consider this another request (with #8 as a prior one) -- my immediate use case is to copy a single set of static HTML into multiple targets (with, respectively, development and production ClojureScript generated).

@m0smith
Copy link
Owner Author

m0smith commented Apr 28, 2014

I had not thought of that use case. I will take a look as soon as I can.

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

2 participants