vastec / ember-unused-components

Search for unused components in your Ember project
51 stars 12 forks source link

Generate a test so "ember test" will fail when there are unused components #12

Closed boris-petrov closed 5 years ago

boris-petrov commented 5 years ago

Great addon, thanks! I would like my build to fail when there are unused components. So perhaps generate a test (like many other addons do) so that running ember test will fail?

tniezurawski commented 5 years ago

Sounds good :+1: Although, I think it should be optional.

I'll add it to my TODO list unless you would like to add something like this?

boris-petrov commented 5 years ago

Yes, making it optional sounds fine. Please add it to your TODO list, thanks. :)

tniezurawski commented 5 years ago

@boris-petrov We went a bit different path but I believe "the problem" was the same :) So the solution is to use failOnUnused option and configure CI to fail if unused components were found.

Here are the details on how to use it: https://github.com/vastec/ember-unused-components#fail-on-unused

tniezurawski commented 5 years ago

Released with 1.1.0 version.

jbryson3 commented 4 years ago

Sorry to bump an old thread, but I'd like to second the opinion that it would be great to have a failing unit test if there are unused components. That way, I wouldn't have to change my CI commands at all - I already run unit tests.