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

@uppy/vue: move @uppy/ packages to peer dependencies #4024

Merged
merged 3 commits into from Aug 22, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
28 changes: 20 additions & 8 deletions website/src/docs/vue.md
Expand Up @@ -7,13 +7,16 @@ 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. Not that those
components rely on external packages that are not longer provided with
`@uppy/vue` (such as `@uppy/core`, `@uppy/dashboard`, `@uppy/drag-drop`,
`@uppy/file-input`, `@uppy/progress-bar`, `@uppy/status-bar`).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
All Vue components are provided through the `@uppy/vue` package. Not that those
components rely on external packages that are not longer provided with
`@uppy/vue` (such as `@uppy/core`, `@uppy/dashboard`, `@uppy/drag-drop`,
`@uppy/file-input`, `@uppy/progress-bar`, `@uppy/status-bar`).
All Vue components are provided through the `@uppy/vue` package but they depend on their 'vanilla' counterparts. For instance, if you use the `Dashboard` component, you also need to install `@uppy/dashboard`.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they depend is a confusing choice of words, because the change precisely remove them from the dependencies.


Install from NPM:

Expand Down Expand Up @@ -64,13 +67,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 +200,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 @@ -8966,16 +8966,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