-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support addons #22
Comments
Are there any ideas on how to move forward with this? I think this would be an extremely useful feature and I am willing to help implement it! |
Hi Ben. We would really appreciate that. We probably have to build up to this, but we are thinking along lines of the following: First we create an ember cli addon (as a separate project) that allows us to turn an app into a gist. This is useful in itself. It would also be useful to have the reverse, an addon that turns a gist into app files, or syncs the two. Then we adapt it to turn addon files (the various trees, addon, app, etc.) into a gist. Then we alter Ember Twiddle to accept an addon listing in twiddle.json, and add code to load the gist for each addon with appropriate namespacing. Please note that this would only initially support addons that don't use any hooks, but we can start with this and build functionality for addon hooks later. Most addons (about 80%) don't use hooks anyway. We're not married to this approach of course. Any other suggestions are welcome. |
As a first step, do you think we could use ember-giftwrap to create the necessary js file to push as a gist? Then all we'd need was a hook into github to create the gist. |
No. Ember Giftwrap combines everything into a single js file and precompiles templates, both of which we do not want to do. If you look at the gists behind Ember Twiddle, we keep everything uncompiled and in separate files to make things easy to edit and use just like in ember-cli. |
I'm going to spend some time on this over the next weeks.. It should be doable to support at least a subset of addons but it will most likely mean doing some server side work. |
Ideally, we want to support stuff that is mostly Ember code (no build process additions). Samples: Issues/Constraints:
Initial plan of attack:
|
Alternative would be building the AMD on the server but leaving templates uncompiled. Or having every version of the template compiler on the server. |
+1 would love to have the ability to test addons in Twiddle. Thanks for this! |
Ok, so some initial progress.. Right now I'm working on an ember-giftwrap based approach in https://github.com/joostdevries/twiddle-backend. This is an application designed to run in AWS Lambda which now succesfully downloads + giftwraps the ember-breadcrumbs addon in 23s. Example output: https://s3.amazonaws.com/addons-test/ember-1.13.1/ember-breadcrumbs/0.1.7/addon.js The idea is that I'll build an API on AWS API gateway which accepts a request like And then redirects to S3 (either after building or to the already built version). @Gaurav0 @alexspeller @rwjblue I'd love to hear your thoughts on this. |
So the above api now works. If the backend has to build the addon, it will return JSON with Next steps:
|
Should this be closed after #395? |
Ideally, we find a way to easily demo addons on Twiddle.
The text was updated successfully, but these errors were encountered: