Skip to content

Commit 3dfc236

Browse files
committed
load pinf bundle
1 parent 98c0c48 commit 3dfc236

7 files changed

Lines changed: 44 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FirePHP for Firebug.Next
22
========================
33

4-
The original [FirePHP Firebug extension](https://github.com/firephp/firephp-extension) re-implemented to leverage the latest [console logging](https://github.com/fireconsole) and [out-of-band communication](https://github.com/firenode) libraries working against [Firebug.Next](https://github.com/firebug/firebug.next).
4+
The original [FirePHP Firebug extension](https://github.com/firephp/firephp-extension) re-implemented to leverage the latest [module loader](https://github.com/pinf/pinf-loader-js), [console logging](https://github.com/fireconsole) and [out-of-band communication](https://github.com/firenode) libraries working against [Firebug.Next](https://github.com/firebug/firebug.next).
55

66
Instructions
77
------------

client/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/bootstrap.js
2+
/install.rdf

client/.jpmignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/node_modules/pinf-for-mozilla-addon-sdk/node_modules/
2+
/node_modules/pinf-for-mozilla-addon-sdk/node_modules/**
3+
/node_modules/pinf-for-mozilla-addon-sdk/examples/
4+
/node_modules/pinf-for-mozilla-addon-sdk/examples/**

client/data/bundle.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
PINF.bundle("", function(require) {
3+
require.memoize("/main.js", function(require, exports, module) {
4+
exports.main = function(options) {
5+
dump("Hello World from FirePHP bundle!");
6+
}
7+
});
8+
});

client/lib/main.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ const { Panel:PANEL } = require("./panel.js");
77
const { Cu:CU } = require("chrome");
88
const { gDevTools:GDEVTOOLS } = CU.import("resource:///modules/devtools/gDevTools.jsm", {});
99

10+
const { data:DATA } = require("sdk/self");
11+
const { sandbox:SANDBOX } = require("pinf-for-mozilla-addon-sdk");
12+
1013

1114
/**
1215
* Application entry point. Read MDN to learn more about Add-on SDK:
@@ -18,6 +21,12 @@ function main(options, callbacks) {
1821

1922
// Wait for Console panel initialization
2023
GDEVTOOLS.on("webconsole-init", onConsoleInit);
24+
25+
26+
SANDBOX(DATA.url("bundle.js"), function(sandbox) {
27+
28+
sandbox.main();
29+
});
2130
}
2231

2332
function onUnload(reason) {

client/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@
66
"author": "Christoph Dorn",
77
"license": "MPL 2.0",
88
"version": "0.1.0",
9-
"main": "lib/main"
9+
"main": "lib/main",
10+
"dependencies": [
11+
"pinf-for-mozilla-addon-sdk"
12+
]
1013
}

package.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,28 @@
33
"dependencies": {
44
"smi.cli": "0.x"
55
},
6+
"upstream": {
7+
"packages": {
8+
"top": [
9+
"../../lib/*",
10+
"/opt/services/*"
11+
]
12+
}
13+
},
14+
"mappings": {
15+
"./client/node_modules/pinf-for-mozilla-addon-sdk": "top/pinf-for-mozilla-addon-sdk"
16+
},
617
"scripts": {
7-
"install": "cd ./server; npm install --unsafe-perm",
18+
"install": "./node_modules/.bin/smi install ; cd ./server; npm install --unsafe-perm",
819
"publish": "cd ./server; npm run-script publish",
920
"run": "cd ./server; npm run-script run",
1021
"start": "cd ./server; npm run-script start"
1122
},
1223
"config": {
24+
"smi.cli": {
25+
"packagesDirectory": "node_modules",
26+
"latestOnly": true
27+
},
1328
"pio.deploy.converter": {
1429
"name": "nodejs-server",
1530
"scriptsPath": "scripts.pio"

0 commit comments

Comments
 (0)