-
Notifications
You must be signed in to change notification settings - Fork 7
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
Comments
Added :target-path as well |
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. |
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. |
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). |
I had not thought of that use case. I will take a look as soon as I can. |
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/
The text was updated successfully, but these errors were encountered: