For custom components there’s a fair bit of set up to do. A script could make this easier.
For instance, you could run npm run create-component card which would:
- create a
_card.scss file for your CSS to go in - this could contain a comment and a .app-card { } line to get you started
- add the
@import “card” line in application.scss
- create a folder in
views/components/ containing a template and a nunjucks macro named appCard.
- import the new macro so that it is available to every view
Helpful?