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

List of all available (by default) and possible (from plugins) methods #20

Open
tunnckoCore opened this issue Jul 22, 2016 · 3 comments
Labels

Comments

@tunnckoCore
Copy link
Contributor

tunnckoCore commented Jul 22, 2016

Would be very useful with that huge collection of plugins.
I'm very familiar with the projects, but still would be useful.

@jonschlinkert
Copy link
Member

we're working on this but I'd love some ideas. I've tried helpers, middleware, brute force.

@tunnckoCore
Copy link
Contributor Author

tunnckoCore commented Sep 13, 2016

I'm thinking it should start from .define and is-registered or is-valid-app. It should collect all names to some array. Actually obejct. Something like

{
  "pluginName": ['methods', 'collected', 'by', 'define']
}

where, plugin name will come from is-registered or is-valid-app.

And probably, even app name. {appNamePlugins: {foo: ['barMethod', 'bazMethod']}}

@tunnckoCore
Copy link
Contributor Author

Actually, name of the plugin can come from function name. get-fn-name works for all functions - generator functions, async/await, arrows and normal - just thin wrapper around fn-name to support arrows functions.

Returns null if not found, so then we should count the number of "anonymous" plugins.

what i'm talking

{
  "baseTask": ["methods", "collected", "by", "define"],
  "foobar": ["aa", "barrr", "ccc"],
  "anonymous1": ["abc", "def"],
  "anonymous2": ["xxx", "zzz", "xyz"]
}

And definitely .define should be collector of method names.

tunnckoCore referenced this issue in base/base-plugins Apr 3, 2017
(this code was co-written with @doowb in early March)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants