Skip to content
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

Add a script to generate custom component file structure #456

Open
frankieroberto opened this issue Jan 26, 2025 · 0 comments
Open

Add a script to generate custom component file structure #456

frankieroberto opened this issue Jan 26, 2025 · 0 comments
Labels
type: enhancement 💡 New feature or request

Comments

@frankieroberto
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement 💡 New feature or request
Development

No branches or pull requests

1 participant