Closed benjaminallison closed 9 years ago
I think there is the possibility that it might just work that way. I cannot find in the yeoman docs which methods get parsed for templates on a remote call, but it uses the normal built-in copy methods (directory
and tarball
), which I think process templates. Did you try it and it didn't work?
Huh. I'm new to Yeoman and didn't even know anything like that was possible! Cool.
The idea was that a value I entered into YeoPress would be used to fill the template tag (say, when I'm asked what the theme directory is called). Is that value exposed in some way that a template tag could work with?
I think that by default it will use the input which is attached to the generator instance. Take a look at the templates in app/tempaltes for examples. The values in the prompts are in the prompts.js file.
Let me know what you find.
Awesome! Wherever I throw <%= conf.get('themeDir') %>
in my Wordpress theme files, it's replaced with the value I entered for the custom theme directory name. So great!
Great! So can we close this?
Close it up!
Even though it's a Yeoman thang, might be worth adding a sentence or two to the docs...
Benjamin Allison Designer
On Jan 13, 2015, at 6:54 PM, Wes Todd notifications@github.com wrote:
Great! So can we close this?
— Reply to this email directly or view it on GitHub.
So when scaffolding with a theme, YeoPress, asks me what the theme directory should be. It would be really neat YeoPress could also populate specified tags within my theme.
Example, say my theme name is
mysite
. In myfunctions.php
file, I have the following function:Well, when YeoPress does it's thang, it could look for that tag <%themeName%>, turning that function into:
One great application is in the
wp_register_script
declaration for livereload:becomes
Just an idea!