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

Plugins - External Package Plugin Support #1

Open
3 tasks done
epicdigitalmedia opened this issue Sep 21, 2022 · 0 comments
Open
3 tasks done

Plugins - External Package Plugin Support #1

epicdigitalmedia opened this issue Sep 21, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@epicdigitalmedia
Copy link
Contributor

epicdigitalmedia commented Sep 21, 2022

New Feature / Enhancement Checklist

Current Limitation

Current version only supports importing functions from the functionDirectory configuration.

Feature / Enhancement Description

I would like to maintain separate packages for specific function implementations, eg: Stripe, Gigwage. The function package would include a folder structure which would be processed similar to the functionDirectory in the local project.

Example Use Case

The plugin be imported from the external package and would accept an optional configuration argument:

import StripeFunctions from '@epicdm/parse-functions-stripe';
import GigwageFunctions from '@epicdm/parse-functions-gigwage';

{
  functionDirectory: 'src/functions', // the directory to watch & build Parse functions
  moduleAlias: '@@functions', // the alias name used for importing the built files
                              // from, e.g. `import initialize, { ClassNames } from '@@functions';`
  plugins: [
    StripeFunctions({ appId: "", appSecret: "", }),
    GigwageFunctions(),
  ]
}

Alternatives / Workarounds

Current workaround would be to maintain a package and copy the folder into the functionDirectory.

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

No branches or pull requests

2 participants