-
Notifications
You must be signed in to change notification settings - Fork 233
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
Implement recipes #1
Comments
Some thoughts:
|
Consider making scaffolding methods a fundamental aspect of recipes. For example, if you create a recipe for a certain type of blog, then you also need to create the scaffolding logic for that recipe. This would make it easier to get up and running quickly with recipies. It would also make it easier to write things like VS templates or Yeoman generators later (though Yeoman is JS-based so it's not clear how we would take advantage of .NET-based scaffolding logic - maybe be calling an intermediate .exe or something). |
Some recipe ideas:
|
When specifying a recipe on the CLI, we want to avoid explicitly loading NuGet packages if possible. One way around this might be to check the loaded packages for the recipe, and if it's not found, try downloading a package with the name Wyam.Recipes.Foo. I.e., this command:
would be equivalent to:
The trick will be in the timing. For this to work, we'd need to load NuGet packages, check for the recipe, then check/load another NuGet package, the try the recipe again. |
Could a recipe also be part of a package that holds something other? In that case maybe saying it should named |
Just a random thought. I think it is to complicated, but maybe someone could make it better. We could add some kind of directory to look up different recipes. Wyam would have some kind of standard directory with the standard recipes. this directory maps every recipe to an nuget package where it can be found. The user could also specify his own directories. We could implement a directory just as an website that hosts some json. Maybe wyam.io could be the default. Another possibility would be to pack it in a nuget package using some kind of interface, maybe utilizing MEF. In the later case the standard could be included in wyam core or a package that is referenced by wyam.all. Usage would be
which would search the installed packages then the standard directory for Foo, downloads its package if needed and then create stuff.
which would search the installed packages, then the provided directory and if nothing found the standard directory for Foo, downloads its package and then create stuff. |
Yep, or more likely there is a recipe-centric module or bit of functionality that someone wants to use even if they don't want the whole recipe. Recipe packages are also going to be a sort of meta-package that include dependencies to other module packages. For example, the blog recipe package is going to reference
Right on. In fact, the first recipe package I've started to work on is called
You mean like this: The goal is to be able to do
I had actually gone down this thought path too - great minds think alike :). The Wyam site would be a good place for it, or I had also considered putting it in a gist or in a file on the repo and fetching from GitHub. After thinking about it though, I'm not sure there's a ton of benefit there. Most recipes are going to be "official", as most modules are now. Keeping the lookup in the code shouldn't be any more trouble than keeping it on the site, and will make lookups much faster since there won't be a web request involved. I may eventually auto-generate this lookup using some sort of code generation (I.e., scan the solution for recipes at compile time and then generate the lookup table), but the static works for now. As for user-specified directories, it'll probably be rare that someone creates an entire recipe just for internal use and doesn't contribute it (of course it could happen, just not sure how often). Even if that does happen, it'll probably be a one-off at which point adding the NuGet package that contains the recipe isn't any more trouble than pointing to a directory. I just don't see a situation when someone has a set of non-official recipes that warrants a whole extra directory. All great thoughts - keep them coming! |
Recipe support is now in the develop branch. At this point, just have to write the actual recipes and themes... |
Recipes should configure one or more pipelines. They should be contained in separate libraries and available via NuGet. Therefore, any interfaces need to go in
Wyam.Abstractions
.They should also allow additional configuration as needed. Consider how they'll be configured from the command line.
The text was updated successfully, but these errors were encountered: