Skip to content

Add a script to generate custom component file structure #222

@frankieroberto

Description

@frankieroberto

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions