Skip to content

Commit

Permalink
@uppy/vue: move @uppy/ packages to peer dependencies (#4024)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Aug 22, 2022
1 parent 70a4615 commit 524b783
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 17 deletions.
27 changes: 22 additions & 5 deletions packages/@uppy/vue/package.json
Expand Up @@ -5,20 +5,37 @@
"main": "lib/index.js",
"types": "types/index.d.ts",
"dependencies": {
"@uppy/dashboard": "workspace:^",
"@uppy/drag-drop": "workspace:^",
"@uppy/file-input": "workspace:^",
"@uppy/progress-bar": "workspace:^",
"@uppy/status-bar": "workspace:^",
"shallow-equal": "^1.2.1"
},
"devDependencies": {
"vue": "^2.6.14"
},
"peerDependencies": {
"@uppy/core": "workspace:^",
"@uppy/dashboard": "workspace:^",
"@uppy/drag-drop": "workspace:^",
"@uppy/file-input": "workspace:^",
"@uppy/progress-bar": "workspace:^",
"@uppy/status-bar": "workspace:^",
"vue": ">=2.6.11"
},
"peerDependenciesMeta": {
"@uppy/dashboard": {
"optional": true
},
"@uppy/drag-drop": {
"optional": true
},
"@uppy/file-input": {
"optional": true
},
"@uppy/progress-bar": {
"optional": true
},
"@uppy/status-bar": {
"optional": true
}
},
"publishConfig": {
"access": "public"
}
Expand Down
27 changes: 19 additions & 8 deletions website/src/docs/vue.md
Expand Up @@ -7,13 +7,15 @@ order: 0
category: "Other Integrations"
---

Uppy provides [Vue][] components for the included UI plugins.
Uppy provides [Vue][] components for some Uppy UI plugins.

Note: _All plugin names are in kebab-case for the HTML element, and in CamelCase for the JavaScript imports, following Vue conventions_

## Installation

All Vue components are provided through the `@uppy/vue` package
All Vue components are provided through the `@uppy/vue` package, note that the
underling Uppy plugin is no longer provided and you would need to install it
explicitly. See [Usage](#usage) for more info.

Install from NPM:

Expand Down Expand Up @@ -64,13 +66,14 @@ export default {
</script>
```

The following plugins are available as Vue component wrappers:
The following plugins are available as Vue component wrappers (you need to
install each package separately):

* `<dashboard />` - renders an inline `@uppy/dashboard`
* `<dashboard-modal />` - renders a `@uppy/dashboard` modal
* `<drag-drop />` - renders a `@uppy/drag-drop` area
* `<progress-bar />` - renders a `@uppy/progress-bar`
* `<status-bar />` - renders a `@uppy/status-bar`
* `<dashboard />` - renders an inline [`@uppy/dashboard`][].
* `<dashboard-modal />` - renders a [`@uppy/dashboard`][] modal.
* `<drag-drop />` - renders a [`@uppy/drag-drop`][] area.
* `<progress-bar />` - renders a [`@uppy/progress-bar`][].
* `<status-bar />` - renders a [`@uppy/status-bar`][].

Each component takes a `props` prop that will be passed to the UI Plugin. Both `@uppy/dashboard` based plugins also take a `plugins` array as a props, making it easier to add your plugins.

Expand Down Expand Up @@ -196,6 +199,14 @@ Import general Core styles from `@uppy/core/dist/style.css` first, then add the

The `<status-bar />` component supports all `@uppy/status-bar` options to be passed as an object on the `props` prop. An Uppy instance must be provided in the `:uppy=''` prop.

[`@uppy/dashboard`]: /docs/dashboard

[`@uppy/drag-drop`]: /docs/drag-drop

[`@uppy/progress-bar`]: /docs/progress-bar

[`@uppy/status-bar`]: /docs/status-bar

[`@uppy/webcam`]: /docs/webcam/

[Nuxt]: https://nuxtjs.org
Expand Down
19 changes: 15 additions & 4 deletions yarn.lock
Expand Up @@ -8954,16 +8954,27 @@ __metadata:
version: 0.0.0-use.local
resolution: "@uppy/vue@workspace:packages/@uppy/vue"
dependencies:
shallow-equal: ^1.2.1
vue: ^2.6.14
peerDependencies:
"@uppy/core": "workspace:^"
"@uppy/dashboard": "workspace:^"
"@uppy/drag-drop": "workspace:^"
"@uppy/file-input": "workspace:^"
"@uppy/progress-bar": "workspace:^"
"@uppy/status-bar": "workspace:^"
shallow-equal: ^1.2.1
vue: ^2.6.14
peerDependencies:
"@uppy/core": "workspace:^"
vue: ">=2.6.11"
peerDependenciesMeta:
"@uppy/dashboard":
optional: true
"@uppy/drag-drop":
optional: true
"@uppy/file-input":
optional: true
"@uppy/progress-bar":
optional: true
"@uppy/status-bar":
optional: true
languageName: unknown
linkType: soft

Expand Down

0 comments on commit 524b783

Please sign in to comment.