Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

CommonJS + AMD support #1562

Merged
merged 12 commits into from
May 11, 2016
Merged

CommonJS + AMD support #1562

merged 12 commits into from
May 11, 2016

Conversation

rnicholus
Copy link
Member

@rnicholus rnicholus commented May 6, 2016

  • Allow access to qq object via CommonJS
  • Allow access to qq object via AMD
  • Ensure qq is global only if CommonJS or AMD are not available
  • Make it easier to import/require each bundled js file
  • Expose css files in CommonJS lib dir as: "legacy.css", "rows.css", and "gallery.css".
  • Update docs to illustrate CommonJS support & integration w/ ES6 modules + Webpack
  • Update fineuploader.com w/ module support
  • Release to master/develop + git tag
  • blog.fineuploader.com for 5.8.0 release
  • Release 5.8.0 on npm
  • Make 5.8.0 available for download on fineuploader.com
  • Tweet 5.8.0 release

This will complete #789.

@rnicholus rnicholus added this to the 5.8.0 milestone May 6, 2016
@rnicholus
Copy link
Member Author

rnicholus commented May 6, 2016

All that's left ATM is docs and the actual release. In addition to allowing Fine Uploader's qq object to be exported via AMD or CommonJS (or global var if neither are available), I also created a "lib" directory as part of the build output that allows all project files to be much more elegantly imported. For example:

Note: This already assumes you are pulling in Fine Uploader via npm.

// use Fine Uploader core (non-ui) for traditional endpoints
var qq = require('fine-uploader')
var uploader = new qq.FineUploaderBasic({...})
// use Fine Uploader UI for traditional endpoints
var qq = require('fine-uploader')

// You may replace "rows" w/ "legacy" or "gallery" depending on your needs
// This assumes you have a loader to handle importing css files, such as Webpack css-loader
require ('fine-uploader/lib/rows.css')

var uploader = new qq.FineUploader({...})
// use Fine Uploader core (non-ui) for s3 endpoints
var qq = require('fine-uploader/lib/s3')
var uploader = new qq.s3.FineUploaderBasic({...})
// use Fine Uploader UI for S3 endpoints
var qq = require('fine-uploader/lib/s3')

// You may replace "rows" w/ "legacy" or "gallery" depending on your needs
// This assumes you have a loader to handle importing css files, such as Webpack css-loader
require ('fine-uploader/lib/rows.css')

var uploader = new qq.s3.FineUploader({...})

...etc

@rnicholus
Copy link
Member Author

Beta published to fine-uploader@5.8.0-beta1.

@rnicholus rnicholus mentioned this pull request May 9, 2016
rnicholus added a commit that referenced this pull request May 11, 2016
@rnicholus rnicholus merged commit 2de6c8f into master May 11, 2016
@rnicholus rnicholus deleted the release/5.8.0 branch May 11, 2016 21:20
rnicholus added a commit that referenced this pull request May 11, 2016
rnicholus added a commit that referenced this pull request May 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant