Skip to content

Commit

Permalink
Merge pull request #572 from OpenGeoscience/webpack
Browse files Browse the repository at this point in the history
Allow bundled geo.js to work in Candela
  • Loading branch information
waxlamp committed May 10, 2016
2 parents 1db67be + dec0592 commit 0bb7175
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
9 changes: 9 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
* @copyright 2015, Brandon Jones, Colin MacKenzie IV
* @license MIT
*
* JQuery
* @copyright jQuery Foundation and other contributors
* @license MIT
*
* earcut
* @copyright 2016, Mapbox
* @license ISC
Expand Down Expand Up @@ -66,8 +70,13 @@ module.exports = $.extend({
sha: require('./sha'),

util: require('./util'),
jQuery: $,
d3: require('./d3'),
gl: require('./gl'),
canvas: require('./canvas'),
gui: require('./ui')
}, require('./registry'));

if (window && !window.$) {
window.$ = $;
}
8 changes: 1 addition & 7 deletions src/vendor.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
// License headers that will be preserved in distributed bundles.
/**
* JQuery
* @copyright jQuery Foundation and other contributors
* @license MIT
*/
/**
* d3
* @copyright 2010-2016, Michael Bostock
* @license BSD-3-Clause
*/
var globals = {
d3: require('d3'),
$: require('jquery')
d3: require('d3')
};

module.exports = globals;
1 change: 0 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ module.exports = {
}
},
externals: {
jquery: 'jQuery',
d3: 'd3'
},
plugins: [
Expand Down

0 comments on commit 0bb7175

Please sign in to comment.