Add a restartless add-on to load Datomish in Firefox.
This commit is contained in:
parent
418bb34d57
commit
ee2dca05d0
4 changed files with 34 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -28,3 +28,5 @@ pom.xml.asc
|
|||
/release-node
|
||||
/release-node/datomish.js
|
||||
/release-node/datomish.bare.js
|
||||
/addon/datomish-test.xpi
|
||||
/addon/datomish.js
|
||||
|
|
2
addon/README.md
Normal file
2
addon/README.md
Normal file
|
@ -0,0 +1,2 @@
|
|||
#Datomish Test
|
||||
An example add-on that loads Datomish on top of Sqlite.jsm.
|
15
addon/index.js
Normal file
15
addon/index.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
var self = require("sdk/self");
|
||||
|
||||
console.log("Datomish Test");
|
||||
console.log("This: " + this);
|
||||
|
||||
var datomish = require("datomish.js");
|
||||
datomish.open("/tmp/foobar.db").then(function (db) {
|
||||
console.log("Got " + db);
|
||||
try {
|
||||
db.close();
|
||||
console.log("Closed.");
|
||||
} catch (e) {
|
||||
console.log("Couldn't close: " + e);
|
||||
}
|
||||
});
|
15
addon/package.json
Normal file
15
addon/package.json
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"title": "Datomish Test",
|
||||
"name": "datomish-test",
|
||||
"version": "0.0.1",
|
||||
"description": "An example add-on that loads Datomish on top of Sqlite.jsm.",
|
||||
"main": "index.js",
|
||||
"author": "Richard Newman <rnewman@mozilla.com>",
|
||||
"engines": {
|
||||
"firefox": ">=48.0a1"
|
||||
},
|
||||
"license": "MPL-2.0",
|
||||
"keywords": [
|
||||
"jetpack"
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue