Browse Source

Corrected ES6 export

master
Ben Ashton 1 year ago
parent
commit
cd373d1f25
  1. 8
      cjs/pawsqlite-websql-adapter.js
  2. 1
      cjs/pawsqlite-websql-adapter.js.map
  3. 1
      lib/pawsqlite-websql-adapter.js.map
  4. 7
      package.json
  5. 2
      src/websql_adapter.mjs
  6. 4
      webpack.config.js

8
lib/pawsqlite-websql-adapter.js → cjs/pawsqlite-websql-adapter.js

@ -388,7 +388,7 @@ var __webpack_exports__ = {};
\********************************/
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ "PawSQLiteWebSQLAdapter": () => (/* binding */ PawSQLiteWebSQLAdapter)
/* harmony export */ });
/* harmony import */ var _websql_adapter_error_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./websql_adapter_error.mjs */ "./src/websql_adapter_error.mjs");
/* harmony import */ var _database_wrapper_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./database_wrapper.mjs */ "./src/database_wrapper.mjs");
@ -401,7 +401,7 @@ __webpack_require__.r(__webpack_exports__);
const databases = new Map();
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
const PawSQLiteWebSQLAdapter = {
name: "PawSQLiteWebSQLAdapter",
open: async (dbName) => {
const version = "1.0";
@ -435,11 +435,11 @@ const databases = new Map();
},
debug: _log_mjs__WEBPACK_IMPORTED_MODULE_3__.enableDebug
});
};
})();
module.exports = __webpack_exports__.default;
module.exports = __webpack_exports__.PawSQLiteWebSQLAdapter;
/******/ })()
;
//# sourceMappingURL=pawsqlite-websql-adapter.js.map

1
cjs/pawsqlite-websql-adapter.js.map

File diff suppressed because one or more lines are too long

1
lib/pawsqlite-websql-adapter.js.map

File diff suppressed because one or more lines are too long

7
package.json

@ -2,7 +2,12 @@
"name": "pawsqlite-websql-adapter",
"version": "1.0.0",
"description": "A WebSQL Adapter for PawSQLite",
"main": "./lib/pawsqlite-websql-adapter.js",
"main": "./cjs/pawsqlite-websql-adapter.js",
"exports": {
"import": "./src/websql_adapter.mjs",
"require": "./cjs/pawsqlite-websql-adapter.js"
},
"module": "./src/websql_adapter.mjs",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack"

2
src/websql_adapter.mjs

@ -5,7 +5,7 @@ import { enableDebug, log } from "./log.mjs";
const databases = new Map();
export default {
export const PawSQLiteWebSQLAdapter = {
name: "PawSQLiteWebSQLAdapter",
open: async (dbName) => {
const version = "1.0";

4
webpack.config.js

@ -7,9 +7,9 @@ var config = {
entry: __dirname + '/src/websql_adapter.mjs',
devtool: 'source-map',
output: {
path: __dirname + '/lib',
path: __dirname + '/cjs',
filename: outputFile,
libraryExport: 'default',
libraryExport: 'PawSQLiteWebSQLAdapter',
libraryTarget: 'commonjs2',
}
};

Loading…
Cancel
Save