Skip to content

Commit d7c7b5a

Browse files
Merged latest master.
2 parents 60be129 + aa33428 commit d7c7b5a

File tree

5 files changed

+19
-6
lines changed

5 files changed

+19
-6
lines changed

lib/umap-js.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
/******/ (function(modules) { // webpackBootstrap
1+
(function webpackUniversalModuleDefinition(root, factory) {
2+
if(typeof exports === 'object' && typeof module === 'object')
3+
module.exports = factory();
4+
else if(typeof define === 'function' && define.amd)
5+
define([], factory);
6+
else {
7+
var a = factory();
8+
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9+
}
10+
})(window, function() {
11+
return /******/ (function(modules) { // webpackBootstrap
212
/******/ // The module cache
313
/******/ var installedModules = {};
414
/******/
@@ -1033,7 +1043,7 @@ exports.searchFlatTree = searchFlatTree;
10331043

10341044
Object.defineProperty(exports, "__esModule", { value: true });
10351045
var umap_1 = __webpack_require__(6);
1036-
window.UMAP = umap_1.UMAP;
1046+
exports.UMAP = umap_1.UMAP;
10371047

10381048

10391049
/***/ }),
@@ -6849,4 +6859,5 @@ class cholesky_CholeskyDecomposition {
68496859

68506860

68516861
/***/ })
6852-
/******/ ]);
6862+
/******/ ]);
6863+
});

lib/umap-js.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"license": "MIT",
1010
"repository": "PAIR-code/umap-js",
1111
"main": "dist/index.js",
12+
"unpkg": "lib/umap-js.min.js",
13+
"jsdelivr": "lib/umap-js.min.js",
1214
"types": "dist/index.d.ts",
1315
"scripts": {
1416
"test": "jest",

src/lib.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@
1717
* ==============================================================================
1818
*/
1919

20-
import { UMAP } from './umap';
21-
(window as any).UMAP = UMAP;
20+
export { UMAP } from './umap';

webpack/lib.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default {
1919
},
2020
output: {
2121
filename: 'umap-js.js',
22+
libraryTarget: 'umd',
2223
path: path.resolve(__dirname, '../lib'),
2324
},
2425
optimization: { minimize: false },

0 commit comments

Comments
 (0)