-
Notifications
You must be signed in to change notification settings - Fork 19
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
Is there a declarative way to not apply substitutions during file copying? #16
Comments
It's not documented yet (although it is shown in the Spec for See https://github.com/seancorfield/deps-new/blob/develop/resources/org/corfield/new/template/template.edn#L3 for an example of this in the Here it is in the Spec: https://github.com/seancorfield/deps-new/blob/develop/src/org/corfield/new.clj#L20-L23 I wanted to give it some time to "bake", with folks using the |
Thanks. If I use {:transform
[["content" "content" {} ["<<" ">>"]]
["themes" "themes" {} ["<<" ">>"]]]} that seems to copy over the text files from the template to the new project as expected (i.e., without any changes). In case it helps, here is the output of
And here is the output of the same command on the copied over file.
This is using Any idea what I might be doing wrong? |
|
Okay. Will try that. Thanks. |
I was able to reproduce this (as you suggested) using just Filed a question on |
I've been thinking about some sort of "raw" copy in |
Undocumented but you can try it out on the latest SHA on develop -- if you declare a |
Thanks. I tried this SHA (and the latest SHA) and I am getting an error: Dorabs-iMac:Projects dorab$ clojure -Sdeps '{:deps {c/c {:local/root "depscryogen"}}}' -Tnew create :template myorg/depscryogen :name test2/myblog :force true
Execution error (IllegalArgumentException) at org.corfield.new/create (new.clj:63).
Additional data must be non-nil.
Full report at:
/var/folders/lk/mf8f6ghs0zqcw70nmy739khm0000gn/T/clojure-14425458454229985389.edn
Dorabs-iMac:Projects dorab$ clojure -Sdeps '{:deps {c/c {:local/root "depscryogen"}}}' -Tnew create :template myorg/depscryogen :name test2/myblog
Execution error (IllegalArgumentException) at org.corfield.new/create (new.clj:63).
Additional data must be non-nil.
Full report at:
/var/folders/lk/mf8f6ghs0zqcw70nmy739khm0000gn/T/clojure-6014328606993832223.edn I took a look at the code, and I believe the problem is at Line 62 of |
Oh, good grief! Sorry, I tested some of the low-level stuff and totally missed that! Try the latest SHA again. |
Thanks. The main issue I see is that the files under |
And, it is copying over |
Maybe Sunday isn't a good day to do open source work? :) Yeah, this is because I changed the Spec stuff to |
OK, try the latest SHA now... |
It works! Passes my rudimentary tests for creating the cryogen template. |
Awesome. Finally! Thank you for bearing with me. I'll leave develop alone for a few days and if you don't run into any other problems, I'll cut 0.4.0. |
Glad I could help. |
I see Alex just released |
v0.4.0 released with latest |
I was working on developing a
deps-new
template forcryogen
. That project contains several files that already contain{{something}}
in them (since they are selmer templates) that should not be substituted during copying to a new project. For example, the currentcryogen
lein template generates files that contain{{name}}
.I guess I could use
:data-fn
but was looking for something more declarative, if available.Thanks.
The text was updated successfully, but these errors were encountered: