adopted-ember-addons / ember-light-table

Lightweight, contextual component based table for Ember
http://adopted-ember-addons.github.io/ember-light-table/
MIT License
312 stars 131 forks source link

Guides on writing an addon for ember-light-table #461

Open buschtoens opened 7 years ago

buschtoens commented 7 years ago

Referencing:

buschtoens commented 7 years ago

All addons should include ember-light-table-addon (and ember-addon) as a keyword in their package.json. This way we, users and aggregators like Ember Observer can automatically query them. Authors should not add ember-light-table as a keyword, as this also lists some weird auto generated packages and to adhere more closely to the ember-addon semantics.

We should add an Addons section to the README, so that users can easily find addons. Authors should be encouraged to submit PRs for adding their addon to that list.

alexander-alvarez commented 7 years ago

is there a way to leverage the ember-light-table generators to make an addon generator or something?

buschtoens commented 7 years ago

No, but we should be able to create a blueprint. Great idea!

ember addon ember-light-table-cell-type-multi-value -b ember-light-table-addon 

ember-light-table-addon has to be a valid npm package. Example: ember-module-unification-blueprint

But we should base it on the addon blueprint.

buschtoens commented 7 years ago

On second thought, a generator could be used after the addon was first created with ember addon ember-light-table-cell-type-multi-value and then ember-light-table was installed as a dependency...

But I think a proper blueprint would still be nicer.

buschtoens commented 7 years ago

I created a blueprint called ember-light-table-addon and published the first version to npm.

You can try it out by running:

ember addon my-elt-addon -b ember-light-table-addon --yarn

You don't need to prepare anything or even install ember-light-table-addon. ember-cli takes care of all that. :grinning:

The repository is at buschtoens/ember-light-table-addon. I added you as collaborators. You just have to accept the invitation.
I also pushed an exemplary addon generated by this blueprint to buschtoens/ember-light-table-example-addon.

There are some typos and other issues. But from a pure PoC point of view, everything's fine, I think.