From aaee518e932818e8f1421dc64e4224d94e338372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Sat, 2 Sep 2017 17:29:28 +0200 Subject: [PATCH] Add `unpkg` to package.json This points https://unpkg.com/uppy to the minified bundle instead of to the commonjs source files. --- README.md | 2 +- package.json | 1 + website/src/docs/index.md | 10 +++++----- website/src/examples/i18n/app.html | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a3865c1e4..a61387eea 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ If you like, you can also use a pre-built bundle, for example from [unpkg CDN](h 1\. Add a script to the bottom of ``: ``` html - + ``` 2\. Add CSS to ``: diff --git a/package.json b/package.json index 746c117cb..8b54adc7d 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "Almost as cute as a Puppy :dog:", "main": "lib/index.js", "jsnext:main": "src/index.js", + "unpkg": "dist/uppy.min.js", "files": [ "src/", "lib/", diff --git a/website/src/docs/index.md b/website/src/docs/index.md index cbe5944c4..58a619c90 100644 --- a/website/src/docs/index.md +++ b/website/src/docs/index.md @@ -17,7 +17,7 @@ const Tus10 = require('uppy/lib/plugins/Tus10')   const uppy = Uppy({ autoProceed: false }) .use(Dashboard, { - trigger: '#select-files', + trigger: '#select-files', replaceTargetContent: true }) .use(Tus10, {endpoint: '//master.tus.io/files/'}) @@ -30,7 +30,7 @@ uppy.on('core:success', (files) => { [Try it live](/examples/dashboard/) -Drag and Drop, Webcam, basic file manipulation (adding metadata), uploading via tus resumable uploads or XHR/Multipart is all possible using just the uppy client module. +Drag and Drop, Webcam, basic file manipulation (adding metadata), uploading via tus resumable uploads or XHR/Multipart is all possible using just the uppy client module. Adding [Uppy Server](/docs/server/) to the mix enables remote sources, such as Instagram, Google Drive and Dropbox. Uploads from remote sources are handled server-to-serber,(so a 5 GB video won’t be eating into your mobile data plan. Files are removed from Uppy Server after an upload is complete, or after a reasonable timeout. Access tokens also don’t stick around for long, for security reasons. @@ -40,16 +40,16 @@ Adding [Uppy Server](/docs/server/) to the mix enables remote sources, such as I $ npm install uppy ``` -We recommend installing from NPM and then using a module bundler such as [Webpack](http://webpack.github.io/), [Browserify](http://browserify.org/) or [Rollup.js](http://rollupjs.org/). +We recommend installing from NPM and then using a module bundler such as [Webpack](http://webpack.github.io/), [Browserify](http://browserify.org/) or [Rollup.js](http://rollupjs.org/). -If you like, you can also use a pre-built bundle, for example from [unpkg CDN](https://unpkg.com/uppy/). In that case `Uppy` will attach itself to the global `window.Uppy` object. +If you like, you can also use a pre-built bundle, for example from [unpkg CDN](https://unpkg.com/uppy/). In that case `Uppy` will attach itself to the global `window.Uppy` object. > ⚠️ The bundle currently consists of most Uppy plugins, so this method is not recommended for production, as your users will have to download all plugins, even if you are using just a few. 1\. Add a script to the bottom of ``: ``` html - + ``` 2\. Add CSS to ``: diff --git a/website/src/examples/i18n/app.html b/website/src/examples/i18n/app.html index 116c17b38..7763cf3a7 100644 --- a/website/src/examples/i18n/app.html +++ b/website/src/examples/i18n/app.html @@ -3,7 +3,7 @@
- +