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 UMD in plotly.js dist files #18

Merged
merged 4 commits into from Nov 20, 2015
Merged

Fix UMD in plotly.js dist files #18

merged 4 commits into from Nov 20, 2015

Conversation

etpinard
Copy link
Contributor

Fixes #14

Use

exports.version = require('../package.json').version;

to add package version to the exported object without interfering with UMD.

- appending `Plotly.version` is the bundle break UMD
  more info: #14
- task bundle.js uses the verisonify transform to
  insert to package.json version in exports.version
- watch builds don't use the versionify transform because
  it breaks source maps webpro/versionify#11
- the exports.version placeholder is set to 'see pacakge.json'
@@ -9,4 +9,7 @@

var saneTopojson = require('sane-topojson');

// export version using browserify-versionify
exports.version = 'see package.json';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the append_version transform pulls in the package.json... would this work here?

exports.version = require('../../package.json').version

- to show package version onto exported object in a low-cost,
  seemless way.
@bpostlethwaite
Copy link
Member

sure lets give it a shot! 💃

etpinard added a commit that referenced this pull request Nov 20, 2015
Fix UMD in plotly.js dist files
@etpinard etpinard merged commit 4c45bee into master Nov 20, 2015
@etpinard etpinard deleted the fix-umd branch November 20, 2015 14:30
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.

None yet

2 participants