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

Help integrating a custom plugin #1166

Closed
bherrero opened this issue Nov 22, 2018 · 2 comments
Closed

Help integrating a custom plugin #1166

bherrero opened this issue Nov 22, 2018 · 2 comments

Comments

@bherrero
Copy link

bherrero commented Nov 22, 2018

Hi,

I'm currently using Uppy through NPM. I've got it installed and running and I've created a new plugin that shows images from a stock image website.

The thing is, should I rebuild the library in order to get it working with my custom plugin? Do I have another way to do it? It's the first time that I'm doing this and I'm a little bit lost to be honest. This plugin has it's js file, obviously, and also a css.

By the way, we're using aurelia as framework, so we might get rid of preact. How could I render it using another framework?

Thank you so much

@goto-bus-stop
Copy link
Contributor

You can't change that Uppy is rendered using Preact, but it should still integrate fine with Aurelia. The public Uppy API only uses raw DOM elements (except inside custom plugins).

If you've created a custom plugin class that extends from Plugin, you can uppy.use() it like any other plugin, eg:

import CustomPlugin from './MyCustomPlugin'
uppy.use(CustomPlugin, { /* options */ })

CSS should be included in the same way that you include other CSS files. With webpack you'd probably use css-loader and import syntax, but that depends on your build setup

@bherrero
Copy link
Author

Thank you so much, it's finally working.

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

No branches or pull requests

2 participants