Kaynağa Gözat

Update import paths in documentation.

Renée Kooi 6 yıl önce
ebeveyn
işleme
e5bacdd5ab
41 değiştirilmiş dosya ile 115 ekleme ve 106 silme
  1. 8 8
      README.md
  2. 2 2
      website/build-examples.js
  3. 3 3
      website/src/api-usage-example.js
  4. 1 1
      website/src/docs/aws-s3-multipart.md
  5. 1 1
      website/src/docs/aws-s3.md
  6. 1 1
      website/src/docs/dashboard.md
  7. 1 1
      website/src/docs/dragdrop.md
  8. 1 1
      website/src/docs/dropbox.md
  9. 1 1
      website/src/docs/fileinput.md
  10. 1 1
      website/src/docs/form.md
  11. 2 2
      website/src/docs/golden-retriever.md
  12. 1 1
      website/src/docs/google-drive.md
  13. 7 3
      website/src/docs/index.md
  14. 1 1
      website/src/docs/informer.md
  15. 1 1
      website/src/docs/instagram.md
  16. 5 5
      website/src/docs/plugins.md
  17. 1 1
      website/src/docs/progressbar.md
  18. 6 6
      website/src/docs/providers.md
  19. 2 1
      website/src/docs/react-dashboard-modal.md
  20. 2 1
      website/src/docs/react-dashboard.md
  21. 2 1
      website/src/docs/react-dragdrop.md
  22. 2 1
      website/src/docs/react-progressbar.md
  23. 2 1
      website/src/docs/react-statusbar.md
  24. 3 3
      website/src/docs/react.md
  25. 3 3
      website/src/docs/redux.md
  26. 1 1
      website/src/docs/statusbar.md
  27. 3 3
      website/src/docs/stores.md
  28. 3 3
      website/src/docs/transloadit.md
  29. 1 1
      website/src/docs/tus.md
  30. 3 3
      website/src/docs/uppy.md
  31. 1 1
      website/src/docs/url.md
  32. 1 1
      website/src/docs/webcam.md
  33. 1 1
      website/src/docs/xhrupload.md
  34. 8 8
      website/src/examples/dashboard/app.es6
  35. 7 7
      website/src/examples/dashboard/index.ejs
  36. 4 4
      website/src/examples/dragdrop/app.es6
  37. 4 4
      website/src/examples/statusbar/app.es6
  38. 5 5
      website/src/examples/transloadit/app.es6
  39. 5 5
      website/src/examples/transloadit/index.ejs
  40. 4 4
      website/src/examples/xhrupload/app.es6
  41. 4 4
      website/themes/uppy/layout/partials/frontpage-code-sample.html

+ 8 - 8
README.md

@@ -24,12 +24,12 @@ Uppy is being developed by the folks at [Transloadit](https://transloadit.com),
 Code used in the above example:
 Code used in the above example:
 
 
 ```js
 ```js
-const Uppy = require('uppy/lib/core')
-const Dashboard = require('uppy/lib/plugins/Dashboard')
-const GoogleDrive = require('uppy/lib/plugins/GoogleDrive')
-const Instagram = require('uppy/lib/plugins/Instagram')
-const Webcam = require('uppy/lib/plugins/Webcam')
-const Tus = require('uppy/lib/plugins/Tus')
+const Uppy = require('@uppy/core')
+const Dashboard = require('@uppy/dashboard')
+const GoogleDrive = require('@uppy/google-drive')
+const Instagram = require('@uppy/instagram')
+const Webcam = require('@uppy/webcam')
+const Tus = require('@uppy/Tus')
 
 
 const uppy = Uppy({ autoProceed: false })
 const uppy = Uppy({ autoProceed: false })
   .use(Dashboard, { trigger: '#select-files' })
   .use(Dashboard, { trigger: '#select-files' })
@@ -172,9 +172,9 @@ And you’ll need [`uppy-server`](https://github.com/transloadit/uppy-server) if
 
 
  - Contributor’s guide in [`website/src/docs/contributing.md`](website/src/docs/contributing.md)
  - Contributor’s guide in [`website/src/docs/contributing.md`](website/src/docs/contributing.md)
  - Changelog to track our release progress (we aim to roll out a release every month): [`CHANGELOG.md`](CHANGELOG.md)
  - Changelog to track our release progress (we aim to roll out a release every month): [`CHANGELOG.md`](CHANGELOG.md)
- 
+
 ## Used by
 ## Used by
- 
+
 Uppy is used by: [Photobox](http://photobox.com), [Law Insider](https://lawinsider.com), [Cool Tabs](https://cool-tabs.com), [Soundoff](https://soundoff.io), [Scrumi](https://www.scrumi.io/) and others.
 Uppy is used by: [Photobox](http://photobox.com), [Law Insider](https://lawinsider.com), [Cool Tabs](https://cool-tabs.com), [Soundoff](https://soundoff.io), [Scrumi](https://www.scrumi.io/) and others.
 
 
 Use Uppy in your project? [Let us know](https://github.com/transloadit/uppy/issues/769)!
 Use Uppy in your project? [Let us know](https://github.com/transloadit/uppy/issues/769)!

+ 2 - 2
website/build-examples.js

@@ -76,8 +76,8 @@ glob(srcPattern, function (err, files) {
     browseFy
     browseFy
       .transform(babelify)
       .transform(babelify)
       .transform(aliasify, {
       .transform(aliasify, {
-        replacements: {
-          '^uppy/lib/(.*?)$': path.join(__dirname, '../src/$1')
+        aliases: {
+          '@uppy': path.join(__dirname, '../packages/@uppy')
         }
         }
       })
       })
 
 

+ 3 - 3
website/src/api-usage-example.js

@@ -1,6 +1,6 @@
-import Uppy from 'uppy/lib/core'
-import Dashboard from 'uppy/lib/plugins/Dashboard'
-import Tus from 'uppy/lib/plugins/Tus'
+import Uppy from '@uppy/core'
+import Dashboard from '@uppy/dashboard'
+import Tus from '@uppy/tus'
 
 
 Uppy({ autoProceed: false })
 Uppy({ autoProceed: false })
   .use(Dashboard, { trigger: '#select-files' })
   .use(Dashboard, { trigger: '#select-files' })

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

@@ -8,7 +8,7 @@ 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.
 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
 ```js
-const AwsS3Multipart = require('uppy/lib/plugins/AwsS3/Multipart')
+const AwsS3Multipart = require('@uppy/aws-s3/lib/Multipart')
 uppy.use(AwsS3Multipart, {
 uppy.use(AwsS3Multipart, {
   limit: 4,
   limit: 4,
   serverUrl: 'https://uppy-server.myapp.net/'
   serverUrl: 'https://uppy-server.myapp.net/'

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

@@ -9,7 +9,7 @@ The `AwsS3` plugin can be used to upload files directly to an S3 bucket.
 Uploads can be signed using [uppy-server][uppy-server docs] or a custom signing function.
 Uploads can be signed using [uppy-server][uppy-server docs] or a custom signing function.
 
 
 ```js
 ```js
-const AwsS3 = require('uppy/lib/plugins/AwsS3')
+const AwsS3 = require('@uppy/aws-s3')
 const ms = require('ms')
 const ms = require('ms')
 
 
 uppy.use(AwsS3, {
 uppy.use(AwsS3, {

+ 1 - 1
website/src/docs/dashboard.md

@@ -15,7 +15,7 @@ Dashboard is a universal UI plugin for Uppy:
 - Ability to pause/resume or cancel (depending on uploader plugin) individual or all files
 - Ability to pause/resume or cancel (depending on uploader plugin) individual or all files
 
 
 ```js
 ```js
-const Dashboard = require('uppy/lib/plugins/Dashboard')
+const Dashboard = require('@uppy/dashboard')
 
 
 uppy.use(Dashboard, {
 uppy.use(Dashboard, {
   // Options
   // Options

+ 1 - 1
website/src/docs/dragdrop.md

@@ -8,7 +8,7 @@ permalink: docs/dragdrop/
 DragDrop renders a simple Drag and Drop area for file selection. Useful when you only want the local device as a file source, don’t need file previews and metadata editing UI, and the [Dashboard](/docs/dashboard/) feels like an overkill.
 DragDrop renders a simple Drag and Drop area for file selection. Useful when you only want the local device as a file source, don’t need file previews and metadata editing UI, and the [Dashboard](/docs/dashboard/) feels like an overkill.
 
 
 ```js
 ```js
-const DragDrop = require('uppy/lib/plugins/DragDrop')
+const DragDrop = require('@uppy/drag-drop')
 
 
 uppy.use(DragDrop, {
 uppy.use(DragDrop, {
   // Options
   // Options

+ 1 - 1
website/src/docs/dropbox.md

@@ -10,7 +10,7 @@ The Dropbox plugin lets users import files their Google Drive account.
 An Uppy Server instance is required for the Dropbox plugin to work. Uppy Server handles authentication with Dropbox, downloads the files, and uploads them to the destination. This saves the user bandwidth, especially helpful if they are on a mobile connection.
 An Uppy Server instance is required for the Dropbox plugin to work. Uppy Server handles authentication with Dropbox, downloads the files, and uploads them to the destination. This saves the user bandwidth, especially helpful if they are on a mobile connection.
 
 
 ```js
 ```js
-const Dropbox = require('uppy/lib/plugins/Dropbox')
+const Dropbox = require('@uppy/dropbox')
 
 
 uppy.use(Dropbox, {
 uppy.use(Dropbox, {
   // Options
   // Options

+ 1 - 1
website/src/docs/fileinput.md

@@ -8,7 +8,7 @@ permalink: 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.
 `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
 ```js
-const XHRUpload = require('uppy/lib/plugins/XHRUpload')
+const XHRUpload = require('@uppy/xhrupload')
 
 
 uppy.use(XHRUpload, {
 uppy.use(XHRUpload, {
   // Options
   // Options

+ 1 - 1
website/src/docs/form.md

@@ -8,7 +8,7 @@ permalink: docs/form/
 Form plugin collects metadata from any specified `<form>` element, right before Uppy begins uploading/processing files. And then optionally appends results back to the form. Currently the appended result is a stringified version of a [`result`](docs/uppy/#uppy-upload) returned from `uppy.upload()` or `complete` event.
 Form plugin collects metadata from any specified `<form>` element, right before Uppy begins uploading/processing files. And then optionally appends results back to the form. Currently the appended result is a stringified version of a [`result`](docs/uppy/#uppy-upload) returned from `uppy.upload()` or `complete` event.
 
 
 ```js
 ```js
-const Form = require('uppy/lib/plugins/Form')
+const Form = require('@uppy/form')
 
 
 uppy.use(Form, {
 uppy.use(Form, {
   // Options
   // Options

+ 2 - 2
website/src/docs/golden-retriever.md

@@ -12,14 +12,14 @@ The GoldenRetriever plugin saves selected files in your browser cache (Local Sto
 ```js
 ```js
 // sw.js
 // sw.js
 
 
-require('uppy/lib/plugins/GoldenRetriever/ServiceWorker.js')
+require('@uppy/golden-retriever/lib/ServiceWorker')
 ```
 ```
 
 
 2\. Register it in your app entry point:
 2\. Register it in your app entry point:
 
 
 ```js
 ```js
 // you app.js entry point
 // you app.js entry point
-const GoldenRetriever = require('uppy/lib/plugins/GoldenRetriever')
+const GoldenRetriever = require('@uppy/golden-retriever')
 
 
 uppy.use(GoldenRetriever, {serviceWorker: true})
 uppy.use(GoldenRetriever, {serviceWorker: true})
 
 

+ 1 - 1
website/src/docs/google-drive.md

@@ -10,7 +10,7 @@ The GoogleDrive plugin lets users import files their Google Drive account.
 An Uppy Server instance is required for the GoogleDrive plugin to work. Uppy Server handles authentication with Google, downloads files from the Drive and uploads them to the destination. This saves the user bandwidth, especially helpful if they are on a mobile connection.
 An Uppy Server instance is required for the GoogleDrive plugin to work. Uppy Server handles authentication with Google, downloads files from the Drive and uploads them to the destination. This saves the user bandwidth, especially helpful if they are on a mobile connection.
 
 
 ```js
 ```js
-const GoogleDrive = require('uppy/lib/plugins/GoogleDrive')
+const GoogleDrive = require('@uppy/google-drive')
 
 
 uppy.use(GoogleDrive, {
 uppy.use(GoogleDrive, {
   // Options
   // Options

+ 7 - 3
website/src/docs/index.md

@@ -10,10 +10,14 @@ 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:
 Uppy consists of a core module and [various plugins](/docs/plugins/) for selecting, manipulating and uploading files. Here’s how it works:
 
 
+```shell
+npm install @uppy/core @uppy/dashboard @uppy/tus
+```
+
 ```js
 ```js
-const Uppy = require('uppy/lib/core')
-const Dashboard = require('uppy/lib/plugins/Dashboard')
-const Tus = require('uppy/lib/plugins/Tus')
+const Uppy = require('@uppy/core')
+const Dashboard = require('@uppy/dashboard')
+const Tus = require('@uppy/tus')
  
  
 const uppy = Uppy({ autoProceed: false })
 const uppy = Uppy({ autoProceed: false })
   .use(Dashboard, {
   .use(Dashboard, {

+ 1 - 1
website/src/docs/informer.md

@@ -8,7 +8,7 @@ permalink: docs/informer/
 The Informer is a pop-up bar for showing notifications. When plugins have some exciting news (or error) to share, they can show a notification here.
 The Informer is a pop-up bar for showing notifications. When plugins have some exciting news (or error) to share, they can show a notification here.
 
 
 ```js
 ```js
-const Informer = require('uppy/lib/plugins/Informer')
+const Informer = require('@uppy/informer')
 
 
 uppy.use(Informer, {
 uppy.use(Informer, {
   // Options
   // Options

+ 1 - 1
website/src/docs/instagram.md

@@ -10,7 +10,7 @@ The Instagram plugin lets users import files their Google Drive account.
 An Uppy Server instance is required for the Instagram plugin to work. Uppy Server handles authentication with Instagram, downloads the pictures and videos, and uploads them to the destination. This saves the user bandwidth, especially helpful if they are on a mobile connection.
 An Uppy Server instance is required for the Instagram plugin to work. Uppy Server handles authentication with Instagram, downloads the pictures and videos, and uploads them to the destination. This saves the user bandwidth, especially helpful if they are on a mobile connection.
 
 
 ```js
 ```js
-const Instagram = require('uppy/lib/plugins/Instagram')
+const Instagram = require('@uppy/instagram')
 
 
 uppy.use(Instagram, {
 uppy.use(Instagram, {
   // Options
   // Options

+ 5 - 5
website/src/docs/plugins.md

@@ -44,8 +44,8 @@ A unique string identifying the plugin. By default, the plugin's name is used, s
 Can be a `string` CSS selector, a DOM element, or a Plugin class. Consider the following example, where `DragDrop` plugin will be rendered into a `body` element:
 Can be a `string` CSS selector, a DOM element, or a Plugin class. Consider the following example, where `DragDrop` plugin will be rendered into a `body` element:
 
 
 ```js
 ```js
-const Uppy = require('uppy/lib/core')
-const DragDrop = require('uppy/lib/plugins/DragDrop')
+const Uppy = require('@uppy/core')
+const DragDrop = require('@uppy/drag-drop')
 const uppy = Uppy()
 const uppy = Uppy()
 uppy.use(DragDrop, { target: 'body' })
 uppy.use(DragDrop, { target: 'body' })
 // or: uppy.use(DragDrop, { target: document.body })
 // or: uppy.use(DragDrop, { target: document.body })
@@ -54,9 +54,9 @@ uppy.use(DragDrop, { target: 'body' })
 While in this one, we are using the `Dashboard` plugin, which can act as a host target for other plugins:
 While in this one, we are using the `Dashboard` plugin, which can act as a host target for other plugins:
 
 
 ```js
 ```js
-const Uppy = require('uppy/lib/core')
-const DragDrop = require('uppy/lib/plugins/Dashboard')
-const GoogleDrive = require('uppy/lib/plugins/GoogleDrive')
+const Uppy = require('@uppy/core')
+const DragDrop = require('@uppy/drag-drop')
+const GoogleDrive = require('@uppy/google-drive')
 const uppy = Uppy()
 const uppy = Uppy()
 uppy.use(Dashboard, {
 uppy.use(Dashboard, {
   trigger: '#uppyModalOpener'
   trigger: '#uppyModalOpener'

+ 1 - 1
website/src/docs/progressbar.md

@@ -8,7 +8,7 @@ permalink: docs/progressbar/
 ProgressBar is a minimalist plugin that shows the current upload progress in a thin bar element, similar to the ones used by YouTube and GitHub when navigating between pages.
 ProgressBar is a minimalist plugin that shows the current upload progress in a thin bar element, similar to the ones used by YouTube and GitHub when navigating between pages.
 
 
 ```js
 ```js
-const ProgressBar = require('uppy/lib/plugins/ProgressBar')
+const ProgressBar = require('@uppy/progress-bar')
 
 
 uppy.use(ProgressBar, {
 uppy.use(ProgressBar, {
   // Options
   // Options

+ 6 - 6
website/src/docs/providers.md

@@ -12,26 +12,26 @@ As of now, the supported providers are [**Dropbox**](/docs/dropbox), [**GoogleDr
 Usage of the Provider plugins is not that different from any other *acquirer* plugin, except that it takes an extra option `serverUrl`, which specifies the url to your running `uppy-server`. This allows Uppy to know what server to connect to when server related operations are required by the provider plugin. Here's a quick example.
 Usage of the Provider plugins is not that different from any other *acquirer* plugin, except that it takes an extra option `serverUrl`, which specifies the url to your running `uppy-server`. This allows Uppy to know what server to connect to when server related operations are required by the provider plugin. Here's a quick example.
 
 
 ```js
 ```js
-const Uppy = require('uppy/lib/core')
-const Dashboard = require('uppy/lib/plugins/Dashboard')
+const Uppy = require('@uppy/core')
+const Dashboard = require('@uppy/dashboaord')
 const uppy = Uppy()
 const uppy = Uppy()
 uppy.use(Dashboard, {
 uppy.use(Dashboard, {
   trigger: '#pick-files'
   trigger: '#pick-files'
 })
 })
 
 
 // for Google Drive
 // for Google Drive
-const GoogleDrive = require('uppy/lib/plugins/GoogleDrive')
+const GoogleDrive = require('@uppy/google-drive')
 uppy.use(GoogleDrive, {target: Dashboard, serverUrl: 'http://localhost:3020'})
 uppy.use(GoogleDrive, {target: Dashboard, serverUrl: 'http://localhost:3020'})
 
 
 // for Dropbox
 // for Dropbox
-const Dropbox = require('uppy/lib/plugins/Dropbox')
+const Dropbox = require('@uppy/dropbox')
 uppy.use(Dropbox, {target: Dashboard, serverUrl: 'http://localhost:3020'})
 uppy.use(Dropbox, {target: Dashboard, serverUrl: 'http://localhost:3020'})
 
 
 // for Instagram
 // for Instagram
-const Instagram = require('uppy/lib/plugins/Instagram')
+const Instagram = require('@uppy/instagram')
 uppy.use(Instagram, {target: Dashboard, serverUrl: 'http://localhost:3020'})
 uppy.use(Instagram, {target: Dashboard, serverUrl: 'http://localhost:3020'})
 
 
 // for Url
 // for Url
-const Url = require('uppy/lib/plugins/Url')
+const Url = require('@uppy/url')
 uppy.use(Url, {target: Dashboard, serverUrl: 'http://localhost:3020'})
 uppy.use(Url, {target: Dashboard, serverUrl: 'http://localhost:3020'})
 ```
 ```

+ 2 - 1
website/src/docs/react-dashboard-modal.md

@@ -8,7 +8,8 @@ order: 65
 The `<DashboardModal />` component wraps the [Dashboard][] plugin, allowing control over the modal `open` state using a prop.
 The `<DashboardModal />` component wraps the [Dashboard][] plugin, allowing control over the modal `open` state using a prop.
 
 
 ```js
 ```js
-import DashboardModal from 'uppy/lib/react/DashboardModal';
+import DashboardModal from '@uppy/react/lib/DashboardModal'
+import { DashboardModal } from '@uppy/react'
 ```
 ```
 
 
 <!-- Make sure the old name of this section still works -->
 <!-- Make sure the old name of this section still works -->

+ 2 - 1
website/src/docs/react-dashboard.md

@@ -8,7 +8,8 @@ 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.
 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.
 
 
 ```js
 ```js
-import Dashboard from 'uppy/lib/react/Dashboard';
+import Dashboard from '@uppy/react/lib/Dashboard'
+import { Dashboard } from '@uppy/react'
 ```
 ```
 
 
 ## Props
 ## Props

+ 2 - 1
website/src/docs/react-dragdrop.md

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

+ 2 - 1
website/src/docs/react-progressbar.md

@@ -8,7 +8,8 @@ order: 63
 The `<ProgressBar />` component wraps the [ProgressBar][] plugin.
 The `<ProgressBar />` component wraps the [ProgressBar][] plugin.
 
 
 ```js
 ```js
-import ProgressBar from 'uppy/lib/react/ProgressBar';
+import ProgressBar from '@uppy/react/lib/ProgressBar'
+import { ProgressBar } from '@uppy/react'
 ```
 ```
 
 
 ## Props
 ## Props

+ 2 - 1
website/src/docs/react-statusbar.md

@@ -8,7 +8,8 @@ order: 61
 The `<StatusBar />` component wraps the [StatusBar][] plugin.
 The `<StatusBar />` component wraps the [StatusBar][] plugin.
 
 
 ```js
 ```js
-import StatusBar from 'uppy/lib/react/StatusBar';
+import StatusBar from '@uppy/react/lib/StatusBar'
+import { StatusBar } from '@uppy/react'
 ```
 ```
 
 
 ## Props
 ## Props

+ 3 - 3
website/src/docs/react.md

@@ -15,9 +15,9 @@ Instead of adding a UI plugin to an Uppy instance with `.use()`, the Uppy instan
 All other props are passed as options to the plugin.
 All other props are passed as options to the plugin.
 
 
 ```js
 ```js
-const Uppy = require('uppy/lib/core')
-const Tus = require('uppy/lib/plugins/Tus')
-const DragDrop = require('uppy/lib/react/DragDrop')
+const Uppy = require('@uppy/core')
+const Tus = require('@uppy/tus')
+const DragDrop = require('@uppy/drag-drop')
 
 
 const uppy = Uppy({
 const uppy = Uppy({
   meta: { type: 'avatar' },
   meta: { type: 'avatar' },

+ 3 - 3
website/src/docs/redux.md

@@ -13,7 +13,7 @@ You can tell Uppy to use your app’s Redux store for its files and UI state. Pl
 
 
 ```js
 ```js
 const { createStore } = require('redux')
 const { createStore } = require('redux')
-const ReduxStore = require('uppy/lib/store/ReduxStore')
+const ReduxStore = require('@uppy/store-redux')
 
 
 const reducer = combineReducers({
 const reducer = combineReducers({
   ...reducers,
   ...reducers,
@@ -32,8 +32,8 @@ const uppy = Uppy({
 `ReduxDevTools` plugin that simply syncs with [redux-devtools](https://github.com/gaearon/redux-devtools) browser or JS extensions, and allows for basic time travel:
 `ReduxDevTools` plugin that simply syncs with [redux-devtools](https://github.com/gaearon/redux-devtools) browser or JS extensions, and allows for basic time travel:
 
 
 ```js
 ```js
-const Uppy = require('uppy/lib/core')
-const ReduxDevTools = require('uppy/lib/plugins/ReduxDevTools')
+const Uppy = require('@uppy/core')
+const ReduxDevTools = require('@uppy/redux-dev-tools')
 
 
 const uppy = Uppy({
 const uppy = Uppy({
   debug: true,
   debug: true,

+ 1 - 1
website/src/docs/statusbar.md

@@ -9,7 +9,7 @@ The StatusBar shows upload progress and speed, ETAs, pre- and post-processing in
 Best used together with a simple file source plugin, such as [FileInput][] or [DragDrop][], or a custom implementation.
 Best used together with a simple file source plugin, such as [FileInput][] or [DragDrop][], or a custom implementation.
 
 
 ```js
 ```js
-const StatusBar = require('uppy/lib/plugins/StatusBar')
+const StatusBar = require('@uppy/statusbar')
 
 
 uppy.use(StatusBar, {
 uppy.use(StatusBar, {
   // Options
   // Options

+ 3 - 3
website/src/docs/stores.md

@@ -25,7 +25,7 @@ There are also some third-party stores:
 To use a store, pass an instance to the [`store` option](/docs/uppy#store-defaultstore) in the Uppy constructor:
 To use a store, pass an instance to the [`store` option](/docs/uppy#store-defaultstore) in the Uppy constructor:
 
 
 ```js
 ```js
-const defaultStore = require('uppy/lib/store/DefaultStore')
+const defaultStore = require('@uppy/store-default')
 
 
 const uppy = Uppy({
 const uppy = Uppy({
   store: defaultStore()
   store: defaultStore()
@@ -47,7 +47,7 @@ This way, you get most of the benefits of Redux, including support for the Redux
 To use the `ReduxStore`, add its reducer to the `uppy` key:
 To use the `ReduxStore`, add its reducer to the `uppy` key:
 
 
 ```js
 ```js
-const ReduxStore = require('uppy/lib/store/ReduxStore')
+const ReduxStore = require('@uppy/store-redux')
 const reducer = combineReducers({
 const reducer = combineReducers({
   ...reducers,
   ...reducers,
   uppy: ReduxStore.reducer
   uppy: ReduxStore.reducer
@@ -58,7 +58,7 @@ Then pass a Redux store instance to the Uppy constructor:
 
 
 ```js
 ```js
 const { createStore } = require('redux')
 const { createStore } = require('redux')
-const ReduxStore = require('uppy/lib/store/ReduxStore')
+const ReduxStore = require('@uppy/store-redux')
 
 
 const store = createStore(reducer)
 const store = createStore(reducer)
 const uppy = Uppy({
 const uppy = Uppy({

+ 3 - 3
website/src/docs/transloadit.md

@@ -10,7 +10,7 @@ The Transloadit plugin can be used to upload files to [Transloadit](https://tran
 [Try it live](/examples/transloadit/)
 [Try it live](/examples/transloadit/)
 
 
 ```js
 ```js
-const Transloadit = require('uppy/lib/plugins/Transloadit')
+const Transloadit = require('@uppy/transloadit')
 
 
 uppy.use(Transloadit, {
 uppy.use(Transloadit, {
   service: 'https://api2.transloadit.com',
   service: 'https://api2.transloadit.com',
@@ -33,8 +33,8 @@ As of Uppy 0.24 the Transloadit plugin includes the [Tus](/docs/tus) plugin to h
 The main endpoint for Transloadit's hosted uppy-servers. You can use this constant in remote provider options, like so:
 The main endpoint for Transloadit's hosted uppy-servers. You can use this constant in remote provider options, like so:
 
 
 ```js
 ```js
-const Dropbox = require('uppy/lib/plugins/Dropbox')
-const Transloadit = require('uppy/lib/plugins/Transloadit')
+const Dropbox = require('@uppy/dropbox')
+const Transloadit = require('@uppy/transloadit')
 
 
 uppy.use(Dropbox, {
 uppy.use(Dropbox, {
   serverUrl: Transloadit.UPPY_SERVER
   serverUrl: Transloadit.UPPY_SERVER

+ 1 - 1
website/src/docs/tus.md

@@ -8,7 +8,7 @@ permalink: docs/tus/
 The Tus plugin brings [tus.io](http://tus.io) resumable file uploading to Uppy by wrapping the [tus-js-client][].
 The Tus plugin brings [tus.io](http://tus.io) resumable file uploading to Uppy by wrapping the [tus-js-client][].
 
 
 ```js
 ```js
-const Tus = require('uppy/lib/plugins/Tus')
+const Tus = require('@uppy/tus')
 
 
 uppy.use(Tus, {
 uppy.use(Tus, {
   endpoint: 'https://master.tus.io/files/', // use your tus endpoint here
   endpoint: 'https://master.tus.io/files/', // use your tus endpoint here

+ 3 - 3
website/src/docs/uppy.md

@@ -8,7 +8,7 @@ permalink: docs/uppy/
 This is the core module that orchestrates everything in Uppy, exposing `state`, `events` and `methods`.
 This is the core module that orchestrates everything in Uppy, exposing `state`, `events` and `methods`.
 
 
 ```js
 ```js
-const Uppy = require('uppy/lib/core')
+const Uppy = require('@uppy/core')
 
 
 const uppy = Uppy()
 const uppy = Uppy()
 ```
 ```
@@ -215,8 +215,8 @@ This option can be used to plug Uppy state into an external state management lib
 Add a plugin to Uppy, with an optional plugin options object.
 Add a plugin to Uppy, with an optional plugin options object.
 
 
 ```js
 ```js
-const Uppy = require('uppy/lib/core')
-const DragDrop = require('uppy/lib/plugins/DragDrop')
+const Uppy = require('@uppy/core')
+const DragDrop = require('@uppy/drag-drop')
 
 
 const uppy = Uppy()
 const uppy = Uppy()
 uppy.use(DragDrop, { target: 'body' })
 uppy.use(DragDrop, { target: 'body' })

+ 1 - 1
website/src/docs/url.md

@@ -10,7 +10,7 @@ The Url plugin lets users import files from the Internet. Paste any URL and it'l
 An Uppy Server instance is required for the Url plugin to work. Uppy Server will download the files and upload them to their destination. This saves bandwidth for the user (especially on mobile connections) and helps avoid CORS restrictions.
 An Uppy Server instance is required for the Url plugin to work. Uppy Server will download the files and upload them to their destination. This saves bandwidth for the user (especially on mobile connections) and helps avoid CORS restrictions.
 
 
 ```js
 ```js
-const Url = require('uppy/lib/plugins/Url')
+const Url = require('@uppy/url')
 
 
 uppy.use(Url, {
 uppy.use(Url, {
   // Options
   // Options

+ 1 - 1
website/src/docs/webcam.md

@@ -10,7 +10,7 @@ The Webcam plugin lets you take photos and record videos with a built-in camera
 > To use the Webcam plugin in Chrome, [your site should be served over https](https://developers.google.com/web/updates/2015/10/chrome-47-webrtc#public_service_announcements). This restriction does not apply on `localhost`, so you don't have to jump through many hoops during development.
 > To use the Webcam plugin in Chrome, [your site should be served over https](https://developers.google.com/web/updates/2015/10/chrome-47-webrtc#public_service_announcements). This restriction does not apply on `localhost`, so you don't have to jump through many hoops during development.
 
 
 ```js
 ```js
-const Webcam = require('uppy/lib/plugins/Webcam')
+const Webcam = require('@uppy/webcam')
 
 
 uppy.use(Webcam, {
 uppy.use(Webcam, {
   // Options
   // Options

+ 1 - 1
website/src/docs/xhrupload.md

@@ -8,7 +8,7 @@ permalink: docs/xhrupload/
 The XHRUpload plugin handles classic HTML multipart form uploads, as well as uploads using the HTTP `PUT` method.
 The XHRUpload plugin handles classic HTML multipart form uploads, as well as uploads using the HTTP `PUT` method.
 
 
 ```js
 ```js
-const XHRUpload = require('uppy/lib/plugins/XHRUpload')
+const XHRUpload = require('@uppy/xhrupload')
 
 
 uppy.use(XHRUpload, {
 uppy.use(XHRUpload, {
   endpoint: 'http://my-website.org/upload'
   endpoint: 'http://my-website.org/upload'

+ 8 - 8
website/src/examples/dashboard/app.es6

@@ -1,11 +1,11 @@
-const Uppy = require('uppy/lib/core')
-const Dashboard = require('uppy/lib/plugins/Dashboard')
-const GoogleDrive = require('uppy/lib/plugins/GoogleDrive')
-const Dropbox = require('uppy/lib/plugins/Dropbox')
-const Instagram = require('uppy/lib/plugins/Instagram')
-const Url = require('uppy/lib/plugins/Url')
-const Webcam = require('uppy/lib/plugins/Webcam')
-const Tus = require('uppy/lib/plugins/Tus')
+const Uppy = require('@uppy/core')
+const Dashboard = require('@uppy/dashboard')
+const GoogleDrive = require('@uppy/google-drive')
+const Dropbox = require('@uppy/dropbox')
+const Instagram = require('@uppy/instagram')
+const Url = require('@uppy/url')
+const Webcam = require('@uppy/webcam')
+const Tus = require('@uppy/tus')
 
 
 const UPPY_SERVER = require('../env')
 const UPPY_SERVER = require('../env')
 
 

+ 7 - 7
website/src/examples/dashboard/index.ejs

@@ -19,13 +19,13 @@ Dashboard is the full-featured UI for Uppy that shows nice file previews and up
 <p>On this page we're using the following JavaScript snippet:</p>
 <p>On this page we're using the following JavaScript snippet:</p>
 
 
 {% codeblock lang:js %}
 {% codeblock lang:js %}
-const Uppy = require('uppy/lib/core')
-const Dashboard = require('uppy/lib/plugins/Dashboard')
-const GoogleDrive = require('uppy/lib/plugins/GoogleDrive')
-const Dropbox = require('uppy/lib/plugins/Dropbox')
-const Instagram = require('uppy/lib/plugins/Instagram')
-const Webcam = require('uppy/lib/plugins/Webcam')
-const Tus = require('uppy/lib/plugins/Tus')
+const Uppy = require('@uppy/core')
+const Dashboard = require('@uppy/dashboard')
+const GoogleDrive = require('@uppy/google-drive')
+const Dropbox = require('@uppy/dropbox')
+const Instagram = require('@uppy/instagram')
+const Webcam = require('@uppy/webcam')
+const Tus = require('@uppy/tus')
 
 
 const uppy = Uppy({
 const uppy = Uppy({
   debug: true,
   debug: true,

+ 4 - 4
website/src/examples/dragdrop/app.es6

@@ -1,7 +1,7 @@
-const Uppy = require('uppy/lib/core/Core')
-const DragDrop = require('uppy/lib/plugins/DragDrop')
-const ProgressBar = require('uppy/lib/plugins/ProgressBar')
-const Tus = require('uppy/lib/plugins/Tus')
+const Uppy = require('@uppy/core')
+const DragDrop = require('@uppy/drag-drop')
+const ProgressBar = require('@uppy/progress-bar')
+const Tus = require('@uppy/tus')
 
 
 const uppyOne = new Uppy({debug: true})
 const uppyOne = new Uppy({debug: true})
 uppyOne
 uppyOne

+ 4 - 4
website/src/examples/statusbar/app.es6

@@ -1,7 +1,7 @@
-const Uppy = require('uppy/lib/core/Core')
-const FileInput = require('uppy/lib/plugins/FileInput')
-const StatusBar = require('uppy/lib/plugins/StatusBar')
-const Tus = require('uppy/lib/plugins/Tus')
+const Uppy = require('@uppy/core')
+const FileInput = require('@uppy/file-input')
+const StatusBar = require('@uppy/statusbar')
+const Tus = require('@uppy/tus')
 
 
 const uppyOne = new Uppy({debug: true})
 const uppyOne = new Uppy({debug: true})
 uppyOne
 uppyOne

+ 5 - 5
website/src/examples/transloadit/app.es6

@@ -1,8 +1,8 @@
-const Uppy = require('uppy/lib/core/Core')
-const Dashboard = require('uppy/lib/plugins/Dashboard')
-const Webcam = require('uppy/lib/plugins/Webcam')
-const Transloadit = require('uppy/lib/plugins/Transloadit')
-const Instagram = require('uppy/lib/plugins/Instagram')
+const Uppy = require('@uppy/core')
+const Dashboard = require('@uppy/dashboard')
+const Webcam = require('@uppy/webcam')
+const Transloadit = require('@uppy/transloadit')
+const Instagram = require('@uppy/instagram')
 
 
 function initUppy () {
 function initUppy () {
   if (window.uppy) {
   if (window.uppy) {

+ 5 - 5
website/src/examples/transloadit/index.ejs

@@ -77,11 +77,11 @@ This example demonstrates how to unlock Transloadit’s features within Uppy.
 
 
 <p>On this page we're using the following JavaScript:</p>
 <p>On this page we're using the following JavaScript:</p>
 {% codeblock lang:js %}
 {% codeblock lang:js %}
-const Uppy = require('uppy/lib/core/Core')
-const Dashboard = require('uppy/lib/plugins/Dashboard')
-const Webcam = require('uppy/lib/plugins/Webcam')
-const Transloadit = require('uppy/lib/plugins/Transloadit')
-const Instagram = require('uppy/lib/plugins/Instagram')
+const Uppy = require('@uppy/core')
+const Dashboard = require('@uppy/transloadit')
+const Webcam = require('@uppy/webcam')
+const Transloadit = require('@uppy/transloadit')
+const Instagram = require('@uppy/instagram')
 
 
 const uppy = Uppy({
 const uppy = Uppy({
   debug: true,
   debug: true,

+ 4 - 4
website/src/examples/xhrupload/app.es6

@@ -1,7 +1,7 @@
-const Uppy = require('uppy/lib/core/Core')
-const FileInput = require('uppy/lib/plugins/FileInput')
-const XHRUpload = require('uppy/lib/plugins/XHRUpload')
-const ProgressBar = require('uppy/lib/plugins/ProgressBar')
+const Uppy = require('@uppy/core')
+const FileInput = require('@uppy/file-input')
+const XHRUpload = require('@uppy/xhrupload')
+const ProgressBar = require('@uppy/progress-bar')
 
 
 const uppy = new Uppy({ debug: true, autoProceed: true })
 const uppy = new Uppy({ debug: true, autoProceed: true })
 uppy.use(FileInput, { target: '.UppyForm', replaceTargetContent: true })
 uppy.use(FileInput, { target: '.UppyForm', replaceTargetContent: true })

+ 4 - 4
website/themes/uppy/layout/partials/frontpage-code-sample.html

@@ -4,10 +4,10 @@ save it as a layout partial
 -->
 -->
 <figure class="highlight bash"><table><tr><td class="code"><pre>$ npm install uppy</pre></td></tr></table></figure>
 <figure class="highlight bash"><table><tr><td class="code"><pre>$ npm install uppy</pre></td></tr></table></figure>
 
 
-<figure class="highlight js"><table><tr><td class="code"><pre><span class="token keyword">import</span> Uppy <span class="token keyword">from</span> <span class="token string">'uppy/lib/core'</span>
-<span class="token keyword">import</span> Dashboard <span class="token keyword">from</span> <span class="token string">'uppy/lib/plugins/Dashboard'</span>
-<span class="token keyword">import</span> Tus <span class="token keyword">from</span> <span class="token string">'uppy/lib/plugins/Tus'</span>
- 
+<figure class="highlight js"><table><tr><td class="code"><pre><span class="token keyword">import</span> Uppy <span class="token keyword">from</span> <span class="token string">'@uppy/core'</span>
+<span class="token keyword">import</span> Dashboard <span class="token keyword">from</span> <span class="token string">'@uppy/dashboard'</span>
+<span class="token keyword">import</span> Tus <span class="token keyword">from</span> <span class="token string">'@uppy/tus'</span>
+
 <span class="token function">Uppy</span><span class="token punctuation">(</span><span class="token punctuation">{</span> autoProceed<span class="token punctuation">:</span> <span class="token boolean">false</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
 <span class="token function">Uppy</span><span class="token punctuation">(</span><span class="token punctuation">{</span> autoProceed<span class="token punctuation">:</span> <span class="token boolean">false</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
   <span class="token punctuation">.</span><span class="token function">use</span><span class="token punctuation">(</span>Dashboard<span class="token punctuation">,</span> <span class="token punctuation">{</span> trigger<span class="token punctuation">:</span> <span class="token string">'#select-files'</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
   <span class="token punctuation">.</span><span class="token function">use</span><span class="token punctuation">(</span>Dashboard<span class="token punctuation">,</span> <span class="token punctuation">{</span> trigger<span class="token punctuation">:</span> <span class="token string">'#select-files'</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
   <span class="token punctuation">.</span><span class="token function">use</span><span class="token punctuation">(</span>Tus<span class="token punctuation">,</span> <span class="token punctuation">{</span> endpoint<span class="token punctuation">:</span> <span class="token string">'https://master.tus.io/files/'</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
   <span class="token punctuation">.</span><span class="token function">use</span><span class="token punctuation">(</span>Tus<span class="token punctuation">,</span> <span class="token punctuation">{</span> endpoint<span class="token punctuation">:</span> <span class="token string">'https://master.tus.io/files/'</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>