komposable / komponent

An opinionated way of organizing front-end code in Ruby on Rails, based on components

Home Page:http://komponent.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

import to namespace get subtracted even if there is other component

MittchoBaroco opened this issue · comments

Expected Behavior

When I remove a component on a namespace using the rails destroy command, the import does not get remove from components/index.js.

Actual Behavior

When I am using rails d component admin/test import "components/admin"; get subtracted even if there is more than one component into the admin folder.

Steps to Reproduce the Problem

  • rails generate component admin/test1
  • rails generate component admin/test2
  • rails destroy component admin/test2

Specifications

  • Ruby version: 2.5.0
  • Rails version: 5.2.0.rc1
  • Komponent version: 1.1.1
  • Platform: Mac OS 10.13.2

Hello @MittchoBaroco,

I agree this behavior is boring. I should check at it soon, we only need to remove imports if all components in namespace doesn't exist anymore.