add js package skeleton

This commit is contained in:
Brandon Liu
2021-02-17 15:08:03 +08:00
parent 5739a33725
commit f054861f96
2 changed files with 23 additions and 0 deletions

12
js/package.json Normal file
View File

@@ -0,0 +1,12 @@
{
"name": "pmtiles",
"version": "0.0.2",
"description": "PMTiles archive decoder for browsers",
"main": "pmtiles.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"homepage": "https://github.com/protomaps/pmtiles",
"author": "Brandon Liu",
"license": "BSD-3-Clause"
}

11
js/pmtiles.js Normal file
View File

@@ -0,0 +1,11 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory);
} else if (typeof module === 'object' && module.exports) {
module.exports = factory();
} else {
root.pmtiles = factory();
}
}(typeof self !== 'undefined' ? self : this, function () {
return {pmtiles:true};
}));