فهرست منبع

Add install instruction to each plugin documentation page.

Renée Kooi 6 سال پیش
والد
کامیت
d4a033fdf3

+ 9 - 1
website/src/docs/aws-s3-multipart.md

@@ -8,13 +8,21 @@ permalink: docs/aws-s3-multipart/
 The `AwsS3Multipart` plugin can be used to upload files directly to an S3 bucket using S3's Multipart upload strategy. With this strategy, files are chopped up in parts of 5MB+ each, so they can be uploaded concurrently. It's also very reliable: if a single part fails to upload, only that 5MB has to be retried.
 
 ```js
-const AwsS3Multipart = require('@uppy/aws-s3/lib/Multipart')
+const AwsS3Multipart = require('@uppy/aws-s3-multipart')
 uppy.use(AwsS3Multipart, {
   limit: 4,
   serverUrl: 'https://uppy-server.myapp.net/'
 })
 ```
 
+## Installation
+
+This plugin is published as the `@uppy/aws-s3-multipart` package.
+
+```shell
+npm install @uppy/aws-s3-multipart
+```
+
 ## Options
 
 ### limit: 0

+ 8 - 0
website/src/docs/aws-s3.md

@@ -23,6 +23,14 @@ There are broadly two ways to upload to S3 in a browser. A server can generate a
 
 There is also a separate plugin for S3 Multipart uploads. Multipart in this sense is Amazon's proprietary chunked, resumable upload mechanism for large files. See the [AwsS3Multipart](/docs/aws-s3-multipart) documentation.
 
+## Installation
+
+This plugin is published as the `@uppy/aws-s3` package.
+
+```shell
+npm install @uppy/aws-s3
+```
+
 ## Options
 
 ### `id: 'AwsS3'`

+ 8 - 0
website/src/docs/dashboard.md

@@ -24,6 +24,14 @@ uppy.use(Dashboard, {
 
 [Try it live](/examples/dashboard/)
 
+## Installation
+
+This plugin is published as the `@uppy/dashboard` package.
+
+```shell
+npm install @uppy/dashboard
+```
+
 ## Options
 
 ```js

+ 8 - 0
website/src/docs/dragdrop.md

@@ -18,6 +18,14 @@ uppy.use(DragDrop, {
 
 [Try it live](/examples/dragdrop/)
 
+## Installation
+
+This plugin is published as the `@uppy/drag-drop` package.
+
+```shell
+npm install @uppy/drag-drop
+```
+
 ## Options
 
 ```js

+ 8 - 0
website/src/docs/dropbox.md

@@ -19,6 +19,14 @@ uppy.use(Dropbox, {
 
 [Try live!](/examples/dashboard/)
 
+## Installation
+
+This plugin is published as the `@uppy/dropbox` package.
+
+```shell
+npm install @uppy/dropbox
+```
+
 ## Options
 
 ```js

+ 10 - 2
website/src/docs/fileinput.md

@@ -10,15 +10,23 @@ alias: docs/fileinput/
 `FileInput` is the most barebones UI for selecting files—it shows a single button that, when clicked, opens up the browser's file selector.
 
 ```js
-const XHRUpload = require('@uppy/xhr-upload')
+const FileInput = require('@uppy/file-input')
 
-uppy.use(XHRUpload, {
+uppy.use(FileInput, {
   // Options
 })
 ```
 
 [Try it live](/examples/xhrupload) - The XHRUpload example uses a `FileInput`.
 
+## Installation
+
+This plugin is published as the `@uppy/file-input` package.
+
+```shell
+npm install @uppy/file-input
+```
+
 ## Options
 
 ```js

+ 8 - 0
website/src/docs/form.md

@@ -15,6 +15,14 @@ uppy.use(Form, {
 })
 ```
 
+## Installation
+
+This plugin is published as the `@uppy/form` package.
+
+```shell
+npm install @uppy/form
+```
+
 ## Options
 
 ```js

+ 10 - 0
website/src/docs/golden-retriever.md

@@ -7,6 +7,16 @@ order: 40
 
 The GoldenRetriever plugin saves selected files in your browser cache (Local Storage for metadata, then Service Worker for all blobs + IndexedDB for small blobs), so that if the browser crashes, Uppy can restore everything and continue uploading like nothing happened. Read more about it [on the blog](https://uppy.io/blog/2017/07/golden-retriever/).
 
+## Installation
+
+This plugin is published as the `@uppy/golden-retriever` package.
+
+```shell
+npm install @uppy/golden-retriever
+```
+
+## Usage
+
 1\. Bundle your own service worker `sw.js` file with Uppy GoldenRetriever’s service worker. If you’re using Browserify, just bundle it separately, for Webpack there is a plugin [serviceworker-webpack-plugin](https://github.com/oliviertassinari/serviceworker-webpack-plugin).
 
 ```js

+ 8 - 0
website/src/docs/google-drive.md

@@ -19,6 +19,14 @@ uppy.use(GoogleDrive, {
 
 [Try live!](/examples/dashboard/)
 
+## Installation
+
+This plugin is published as the `@uppy/google-drive` package.
+
+```shell
+npm install @uppy/google-drive
+```
+
 ## Options
 
 ```js

+ 1 - 0
website/src/docs/index.md

@@ -11,6 +11,7 @@ Uppy is a sleek, modular file uploader that integrates seamlessly with any frame
 Uppy consists of a core module and [various plugins](/docs/plugins/) for selecting, manipulating and uploading files. Here’s how it works:
 
 ```shell
+# install dependencies
 npm install @uppy/core @uppy/dashboard @uppy/tus
 ```
 

+ 10 - 0
website/src/docs/informer.md

@@ -17,6 +17,16 @@ uppy.use(Informer, {
 
 [Try it live](/examples/dashboard/) - The Informer is included in the Dashboard by default.
 
+## Installation
+
+> If you are using the `uppy` package, you do not need to install this plugin manually.
+
+This plugin is published as the `@uppy/informer` package.
+
+```shell
+npm install @uppy/informer
+```
+
 ## Options
 
 ### `id: 'Informer'`

+ 10 - 0
website/src/docs/instagram.md

@@ -19,6 +19,16 @@ uppy.use(Instagram, {
 
 [Try live!](/examples/dashboard/)
 
+## Installation
+
+> If you are using the `uppy` package, you do not need to install this plugin manually.
+
+This plugin is published as the `@uppy/instagram` package.
+
+```shell
+npm install @uppy/instagram
+```
+
 ## Options
 
 ```js

+ 8 - 0
website/src/docs/progressbar.md

@@ -18,6 +18,14 @@ uppy.use(ProgressBar, {
 
 [Try it live](/examples/dragdrop/) - The DragDrop example uses ProgressBars to show progress.
 
+## Installation
+
+This plugin is published as the `@uppy/progress-bar` package.
+
+```shell
+npm install @uppy/progress-bar
+```
+
 ## Options
 
 ```js

+ 6 - 0
website/src/docs/react-dashboard-modal.md

@@ -7,6 +7,12 @@ order: 65
 
 The `<DashboardModal />` component wraps the [Dashboard][] plugin, allowing control over the modal `open` state using a prop.
 
+## Installation
+
+```shell
+npm install @uppy/react
+```
+
 ```js
 import DashboardModal from '@uppy/react/lib/DashboardModal'
 import { DashboardModal } from '@uppy/react'

+ 6 - 0
website/src/docs/react-dashboard.md

@@ -7,6 +7,12 @@ order: 64
 
 The `<Dashboard />` component wraps the [Dashboard][] plugin. It only renders the Dashboard inline. To use the Dashboard modal (`inline: false`), use the [`<DashboardModal />`](/docs/react/dashboard-modal) component.
 
+## Installation
+
+```shell
+npm install @uppy/react
+```
+
 ```js
 import Dashboard from '@uppy/react/lib/Dashboard'
 import { Dashboard } from '@uppy/react'

+ 6 - 0
website/src/docs/react-dragdrop.md

@@ -8,6 +8,12 @@ order: 62
 
 The `<DragDrop />` component wraps the [DragDrop][] plugin.
 
+## Installation
+
+```shell
+npm install @uppy/react
+```
+
 ```js
 import DragDrop from '@uppy/react/lib/DragDrop';
 import { DragDrop } from '@uppy/react';

+ 6 - 0
website/src/docs/react-progressbar.md

@@ -8,6 +8,12 @@ order: 63
 
 The `<ProgressBar />` component wraps the [ProgressBar][] plugin.
 
+## Installation
+
+```shell
+npm install @uppy/react
+```
+
 ```js
 import ProgressBar from '@uppy/react/lib/ProgressBar'
 import { ProgressBar } from '@uppy/react'

+ 6 - 0
website/src/docs/react-statusbar.md

@@ -8,6 +8,12 @@ order: 61
 
 The `<StatusBar />` component wraps the [StatusBar][] plugin.
 
+## Installation
+
+```shell
+npm install @uppy/react
+```
+
 ```js
 import StatusBar from '@uppy/react/lib/StatusBar'
 import { StatusBar } from '@uppy/react'

+ 8 - 0
website/src/docs/react.md

@@ -7,6 +7,14 @@ order: 60
 
 Uppy provides [React][] components for the included UI plugins.
 
+## Installation
+
+All React components are provided through the `@uppy/react` package.
+
+```shell
+npm install @uppy/react
+```
+
 ## Usage
 
 The components can be used with [React][] or API-compatible alternatives such as [Preact][].

+ 8 - 0
website/src/docs/statusbar.md

@@ -19,6 +19,14 @@ uppy.use(StatusBar, {
 
 [Try it live](/examples/statusbar/)
 
+## Installation
+
+This plugin is published as the `@uppy/status-bar` package.
+
+```shell
+npm install @uppy/status-bar
+```
+
 ## Options
 
 ```js

+ 8 - 0
website/src/docs/transloadit.md

@@ -26,6 +26,14 @@ uppy.use(Transloadit, {
 
 As of Uppy 0.24 the Transloadit plugin includes the [Tus](/docs/tus) plugin to handle the uploading, so you no longer have to add it manually.
 
+## Installation
+
+This plugin is published as the `@uppy/transloadit` package.
+
+```shell
+npm install @uppy/transloadit
+```
+
 ## Properties
 
 ### `Transloadit.UPPY_SERVER`

+ 8 - 0
website/src/docs/tus.md

@@ -18,6 +18,14 @@ uppy.use(Tus, {
 })
 ```
 
+## Installation
+
+This plugin is published as the `@uppy/tus` package.
+
+```shell
+npm install @uppy/tus
+```
+
 ## Options
 
 The Tus plugin supports all of [tus-js-client][]’s options. Additionally:

+ 6 - 0
website/src/docs/uppy.md

@@ -13,6 +13,12 @@ const Uppy = require('@uppy/core')
 const uppy = Uppy()
 ```
 
+## Installation
+
+```shell
+npm install @uppy/core
+```
+
 ## Options
 
 ```js

+ 8 - 0
website/src/docs/url.md

@@ -19,6 +19,14 @@ uppy.use(Url, {
 
 [Try live!](/examples/dashboard/)
 
+## Installation
+
+This plugin is published as the `@uppy/url` package.
+
+```shell
+npm install @uppy/url
+```
+
 ## Options
 
 ```js

+ 8 - 0
website/src/docs/webcam.md

@@ -19,6 +19,14 @@ uppy.use(Webcam, {
 
 [Try live!](/examples/dashboard/)
 
+## Installation
+
+This plugin is published as the `@uppy/webcam` package.
+
+```shell
+npm install @uppy/webcam
+```
+
 ## Options
 
 ```js

+ 8 - 0
website/src/docs/xhrupload.md

@@ -18,6 +18,14 @@ uppy.use(XHRUpload, {
 
 [Try it live](/examples/xhrupload/)
 
+## Installation
+
+This plugin is published as the `@uppy/xhr-upload` package.
+
+```shell
+npm install @uppy/xhr-upload
+```
+
 ## Options
 
 ### `id: 'XHRUpload'`