Skip to content
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.

Component generator #2

Open
Spone opened this issue Feb 25, 2018 · 1 comment
Open

Component generator #2

Spone opened this issue Feb 25, 2018 · 1 comment

Comments

@Spone
Copy link
Contributor

Spone commented Feb 25, 2018

Let's add a generator, similar to the Rails' one (rails generate component button).

It could be used as: bundle exec middleman component button

We can draw inspiration from https://github.com/middleman/middleman-blog/blob/master/lib/middleman-blog/commands/article.rb

@florentferry
Copy link
Member

The component generator should create:

  • a component directory inside frontend/components with:
    • [component_name]_component.rb
    • [component_name].slim
    • [component_name].css
    • [component_name].js
  • append import "components/[component_name]/[component_name]" into frontend/components/index.js

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants