- Published on
Sitecore Component Scaffolder: Revamped Component Creation
- Authors
- Name
- Ben Sewards
- @BenjaminSewards
A scaffolding tool is a beneficial way of kick-starting the creation of a Feature, such as a Sitecore Component, while providing guard rails and best practices for the Project at hand. Scaffolding tools should be maintainable, readable, and efficient enough that new evolutions of the templating can be introduced during development through none other than developer experiences. For example, your initial Sprint may start off with a simple component creation, including the standard JSS Styleguide patterns. Once the team has built up the project foundation and set out on completing a couple features, there's now room for those standards of component creation to evolve based on your team's needs and established principles.
Although Sitecore JSS starter kits come with a simple scaffolding command that can be expanded upon, I have found it's maintainability to be cumbersome and lack features I was looking for, such as prompting developers for choices that determine how the feature is created.
The Sitecore Component Scaffolder
The Sitecore Component Scaffolder intends on acting as the starting point for Sitecore component scaffolding, features, and beyond. This tooling has worked well and has adapted to my project needs, so I've decided to share a sample of it's capabilities with the community!
✨ Current Features ✨
✅ Pre-determined sample questions built within the plopfile.mjs file.
✅ Handlebars templating logic with conditions for building out the file based on Plop responses
✅ Select from a dynamic list of existing project Feature choices or create a new Feature
✅ Powerful Plop question types such as input, confirm, and list