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 Suggestion: Generating template.properties for Pamflet #48

Open
joescii opened this issue Mar 12, 2015 · 3 comments
Open

Feature Suggestion: Generating template.properties for Pamflet #48

joescii opened this issue Mar 12, 2015 · 3 comments

Comments

@joescii
Copy link

joescii commented Mar 12, 2015

I have an idea for a feature that I could take a stab at, but I'd like to bounce the ideas off you guys first. I'd like to be able to inject my application version as specified in sbt into my template.properties file consumed by Pamflet. Based on what I see in PamfletSupport.scala, it only reads the source directory today. From there, Pamflet picks up the template.properties in produce.scala.

From my cursory glance, I believe I will need to enhance both Pamflet and sbt-site to be able to specify a different location for my template.properties which I could generate as an sbt task. Maybe by copying the entirety of the src/pamflet directory to another location where I could also drop off the template.properties file would be an option if we only update sbt-site to accept an optional parameter of where to pick it up.

That's what I've come up with thus far. Do any of you see another better approach?

Thanks,
Joe

@jsuereth
Copy link
Member

+1 from me. @eed3si9n ?

@eed3si9n
Copy link
Member

I don't exactly remember where Pamflet finds the template file, my preference would be to change Pamflet so we can keep in-memory Property as a setting (modify it if we need to), and pass that in.
Also, I am thinking about using sbt-pamflet from sbt-site when the next version of Pamflet comes out to take advantage of compilable documentation.

@joescii
Copy link
Author

joescii commented Mar 20, 2015

Cool, I'll take a look back at Pamflet to see how we can pass in a property file. My recollection is that it simply picks it up in the root directory by name.

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

3 participants