Kameron Kincade
Kameron Kincade

Reputation: 623

Ember CLI "Blueprint" for Creating an Addon

I have been wanting to create Ember addons that adhere to my company's structure and have some pre-formatted files.

For instance, I would like...

My understanding is that blueprints must live inside an addon/application and therefore there is no way to modify what the addon structure looks like at the time it is generated. Is it possible to do these types of things through the concept of a "blueprint"? Or would I need to fork Ember CLI and modify the internals? I dislike the idea of forking Ember CLI since I would need to manually keep it up to date.

Thanks in advance!

Upvotes: 0

Views: 142

Answers (1)

Kelly Selden
Kelly Selden

Reputation: 1276

You can definitely use custom blueprints when generating a brand new project. glimmerjs uses this with success. You can use this repo as a guideline https://github.com/glimmerjs/glimmer-blueprint, then generate your new project via

ember new my-addon -b https://github.com/my-company/my-companys-blueprint.git

That blueprint source can be a git repo url, or npm package.

Upvotes: 2

Related Questions