Example #1
0
        public void generate_a_simple_template()
        {
            // SAMPLE: generating-with-templates
            var library = new TemplateLibrary("path to your templates");
            var builder = new TemplatePlanBuilder(library);
            var request = buildTemplateRequest();

            // Build a TemplatePlan
            var plan = builder.BuildPlan(request);
            plan.Execute();
            // ENDSAMPLE
        }
Example #2
0
        public static TemplatePlan BuildPlan(TemplateRequest request)
        {
            var planner = new TemplatePlanBuilder(_templates.Value);

            var plan = planner.BuildPlan(request);
            if (plan.Steps.OfType<GemReference>().Any())
            {
                plan.Add(new BundlerStep());
            }

            return plan;
        }