Skip to content

Commit 4b9f4de

Browse files
committed
Integrate objectbox-js & objectbox-dart
1 parent fae79cf commit 4b9f4de

11 files changed

+977
-12
lines changed

objectbox-js/.eslintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"root": true,
33
"parser": "@typescript-eslint/parser",
4-
"parserOptions": { "project": "./tsconfig.json" },
4+
// TODO, doesn't like webpack config
5+
// "parserOptions": { "project": "./tsconfig.json" },
56
"env": { "es6": true },
67
"ignorePatterns": ["node_modules", "build", "coverage"],
78
"plugins": ["import", "eslint-comments", "functional"],

objectbox-js/README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ObjectBox TS/JS (based on IndexedDB)
2+
3+
This is a very basic ObjectBox implementation for JavaScript/TypeScript, based on IndexedDB instead of the native objectbox-c API.
4+
5+
### Build and copy to objectbox-dart
6+
The following code builds TypeScript files into `build` folder, uses `webpack` to create a single JS,
7+
copies the JS (and sourcemap) to `../objectbox/lib/`, and generates dart binding code in `../objectbox/lib/src/web/`.
8+
```
9+
npm run build:main
10+
npm run install
11+
npm run generate:dart
12+
```
13+
14+
### Notes and useful links about the compilation/integration:
15+
* modules are not supported, we need to compile to a single JS file (using `webpack`)
16+
* example: https://github.com/google/chartjs.dart/
17+
* example: https://github.com/matanlurey/dart_js_interop
18+
* modules issue: https://github.com/dart-lang/sdk/issues/25059
19+
20+
### IndexedDB resources
21+
* https://developers.google.com/web/ilt/pwa/working-with-indexeddb
22+
* https://www.tutorialspoint.com/html5/html5_indexeddb.htm
23+
* https://javascript.info/indexeddb

0 commit comments

Comments
 (0)