actions-on-google / actions-on-google-nodejs

Node.js client library for Actions on Google
https://actions-on-google.github.io/actions-on-google-nodejs
Apache License 2.0
900 stars 193 forks source link

V2 Alpha Discussion: Official Plugins/Utils Distribution #110

Open Canain opened 6 years ago

Canain commented 6 years ago

Hello Actions on Google Node.js developers!

Now that the V2 Client Library alpha has been out, we want to get feedback on where we should put our official plugins and utilities that aren't a part of the core library but are still written officially by Google.

Currently, during the alpha, our plan is to distribute official plugins and utilities in the same repository as the client library, but clearly mark them as separate by not including them in the top level.

This means to require plugins you would do:

const { plugin1 } = require('actions-on-google/plugin/plugin1')

And for utilities you would do:

const { utility1 } = require('actions-on-google/util/utility1')

Including it in the same repository and npm module makes it easier for us to develop the plugins/utilities and easier for developers to require/import. We can also use the plugins as a test for development on the client library plugin system. However, it might make more sense organizationally to separate them out into different repos and/or separate npm modules, as well as getting rid of extra components from the core library.

Tell us what you think! We want to hear your opinion about this as the goal is to provide the best experience for developers.

dustincoates commented 6 years ago

All else being equal, +1 for separating them out into separate NPM modules (so long as it doesn't mean fewer plugins).

mikelnrd commented 6 years ago

I vote keep them in the same repo - after all doesn't google believe in the monorepo approach.

In addition to the reasons you gave Canain, more reasons that come to mind:

From your examples it looks easy to import a plugin or utility. Personally I think keeping them in the same repo provides the better experience for developers.

maiermic commented 5 years ago

utils folder has been removed. How can I use actions-on-google/util/ssml with the latest version of actions-on-google? Has it been moved to a separate npm module?

igilham commented 5 years ago

As long as it's well documented then I don't mind where the plugins and utilities are placed. There may be a need for some plugins to be external if they include huge dependencies and bloat the distribution size excessively, but that seems unlikely.