Skip to content
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

Adding plugin support to dreem2 #11

Merged
merged 5 commits into from Jul 27, 2015
Merged

Adding plugin support to dreem2 #11

merged 5 commits into from Jul 27, 2015

Conversation

gnovos
Copy link
Collaborator

@gnovos gnovos commented Jul 27, 2015

Check out the sample component, dreem2 branch from here: https://github.com/teem2/teem-sample_component.git

The server will need to be run with the proper command line switch, like so:

 node ./server.js -plugin ../teem-sample_component/

After that a working example can then be found here:

http://localhost:8080/plugins/teem-sample_component/examples/sample_component.dre

<handler event="init">
this.__srequest = require('$PLUGIN/sync-request');
</handler>
<method name="request" args="url">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this method name local to the plugin, or is it global? If global should we add the name of the plugin to avoid name collisions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Methods do clobber (i.e. right now it's up to the plugin designer to namespace the methods they create if they choose), but handlers do not. This was intentional since it's the most flexible in terms of layering plugins on top of each other and required the least re-writing, but we can change it to work another way pretty easily. We should just talk through this in person later.

@promanik promanik self-assigned this Jul 27, 2015
gnovos added a commit that referenced this pull request Jul 27, 2015
Adding plugin support to dreem2
@gnovos gnovos merged commit b95e486 into dev Jul 27, 2015
@gnovos gnovos deleted the plugins branch July 27, 2015 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants