How to Create a Plugin

What are the steps required to make a custom element into a plugin so that it can be used in multiple apps? The custom element is already developed and tested within a test app. I just want to make it into a plugin to use in various apps.

This topic should get you started Aurelia library template. I’ve used @dwaynecharrington’s sample for several Plugins including Aurelia Store, so I can definitely recommend it.

1 Like

A quick answer is to export a configure function that globalizes the resources, and then set your package.json main property to the source with the configure function.

1 Like

Would be great to see a “Build Your Own” walkthrough in the Guides under the Plugins section.

3 Likes

I just went through this/ Why the aurelia.io site isnn’t the go to place for all knowledge is just mind boggling to me.

Small community means not enough resource on doc writing :slight_smile:

Everyone has a day job, including @EisenbergEffect… That tells you sadly how tight the resource is.

1 Like

But people are writing some docs/examples, just make it so this is the go to place instead of a separate github repo

2 Likes

A lot of those articles and samples were written before there was a place to put them, like Discourse. Open source is all volunteer so let’s not be too critical. Aurelia has come a long way and is really awesome in so many ways. I appreciate everything the team has done so far and am excited to see what is coming. I’m sure friendly suggestions are always welcomed by the team, though.

2 Likes

Plugin development now has a workflow aided by the CLI. Check out the documentation here: https://aurelia.io/docs/plugins/write-new-plugin

1 Like