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

fix: export Drift's public API #83

Merged
merged 2 commits into from
Sep 29, 2018
Merged

fix: export Drift's public API #83

merged 2 commits into from
Sep 29, 2018

Conversation

frederickfogerty
Copy link
Contributor

@frederickfogerty frederickfogerty commented Sep 19, 2018

Description

This PR uses the approach preferred by the Closure docs to export the public API of the Drift class. This has to happen because Closure rewrites the names of the class methods, which prevents third-parties from calling methods by their proper names.

Fixes #81

Bug Fix

  • All existing unit tests are still passing (if applicable)
  • [N/A] Add new passing unit tests to cover the code introduced by your PR
  • [N/A] Update the readme
  • [N/A] Update or add any necessary API documentation
  • Add some steps so we can test your bug fix
  • The PR title is in the conventional commit format: e.g. fix(<area>): fixed bug #issue-number
  • Add your info to the contributors array in package.json!

Steps to Test

Steps:

  1. Clone this PR, npm install
  2. Run npm run build:watch
  3. Play around with drift in index.html. console.log(new Drift(...)) should show that everything is exported on the prototype.

@frederickfogerty frederickfogerty merged commit 82052c4 into master Sep 29, 2018
@frederickfogerty frederickfogerty deleted the fred/fix-closure branch September 29, 2018 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API-Calls like setZoomImageURL(), destroy() can not be found in the minified version of drift.js
2 participants