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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃帾 Change the way platforms are imported 鈿狅笍 DO NOT MERGE 鈿狅笍 #93

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stojanovic
Copy link
Member

@stojanovic stojanovic commented Mar 12, 2017

Goal: update the structure so we can import new platforms without adding them to the core and add plugin support.

To do:

  • Update structure and allow users to pass an instance of the platform class in platforms list
  • Automatically export items defined in platform class constructor
  • Export platform classes
  • Review
  • Trigger postDeploy method in post deploy
  • Add more tests
  • Beta test each platform

@stojanovic stojanovic changed the title 馃帾 Change the way platforms are imported 馃帾 Change the way platforms are imported [DO NOT MERGE] Mar 12, 2017
@stojanovic stojanovic changed the title 馃帾 Change the way platforms are imported [DO NOT MERGE] 馃帾 Change the way platforms are imported [鈿狅笍 DO NOT MERGE 鈿狅笍] Mar 12, 2017
@stojanovic stojanovic changed the title 馃帾 Change the way platforms are imported [鈿狅笍 DO NOT MERGE 鈿狅笍] 馃帾 Change the way platforms are imported 鈿狅笍 DO NOT MERGE 鈿狅笍 Mar 12, 2017
module.exports.SlackPlatform = SlackPlatform;
module.exports.TelegramPlatform = TelegramPlatform;
module.exports.TwilioPlatform = TwilioPlatform;
module.exports.ViberPlatform = ViberPlatform;
Copy link
Member

Choose a reason for hiding this comment

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

this can be one object

module.exports = {
  AlexaPlatform: AlexaPlatform,
  ...
};

Copy link
Member Author

Choose a reason for hiding this comment

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

馃憤

}
}

module.exports = ViberPlatform;
Copy link
Member

Choose a reason for hiding this comment

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

if we compare the platform.js for all of these platforms we come to an identical structure, with the difference in just its parameters and enabled template()
~
maybe it can be a single object, with different params and a templates enabled or disabled

Copy link
Member Author

Choose a reason for hiding this comment

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

It can, but the point is that this can be fully customized by any new plugin. We can probably create a base class and extend it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants