From 14bfa968896a3aa2b23da410d072f105dd99b129 Mon Sep 17 00:00:00 2001 From: Christoph Dorn Date: Wed, 14 May 2014 00:18:21 -0700 Subject: [PATCH 1/3] minimal config and code; still needs config for path to www --- .gitignore | 3 +++ README.md | 15 +++++++++++++++ package.json | 31 +++++++++++++++++++++++++++++++ server.js | 2 ++ 4 files changed, 51 insertions(+) create mode 100644 package.json create mode 100644 server.js diff --git a/.gitignore b/.gitignore index cf93e53..6d74b2e 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,6 @@ # Extensions /extension/firebug@software.joehewitt.com +# dev-system +/node_modules/ +/.pio.cache/ diff --git a/README.md b/README.md index 94e3d14..87dc97b 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,18 @@ This repository contains all test files that are manually used to reproduce cert Firebug and/or Firefox behavior Note that all automated tests (FBTests) should be part of firebug/tests repository. + + +Usage +===== + +Standalone +---------- + +Place this repository onto a webserver and serve it as static HTML. + +Within dev-system +----------------- + +This project automatically deploys with the [dev-system](https://github.com/firebug/dev-system). + diff --git a/package.json b/package.json new file mode 100644 index 0000000..11585f5 --- /dev/null +++ b/package.json @@ -0,0 +1,31 @@ +{ + "name": "manual-tests", + "version": "0.0.0", + "private": true, + "pm": "npm", + "dependencies": { + "smi.cli": "0.x" + }, + "scripts": { + "install": "./node_modules/.bin/smi install" + }, + "upstream": { + "packages": { + "top": [ + "../../*", + "../../../../*" + ] + } + }, + "mappings": { + "io.pinf.server.www": "top/io.pinf.server.www" + }, + "config": { + "smi.cli": { + "packagesDirectory": "node_modules" + }, + "pio.deploy.converter": { + "name": "nodejs-server" + } + } +} \ No newline at end of file diff --git a/server.js b/server.js new file mode 100644 index 0000000..1e8e88f --- /dev/null +++ b/server.js @@ -0,0 +1,2 @@ + +require("io.pinf.server.www").for(module, __dirname); From fa3b3bf2ef259fe97a64fb28763122535f764931 Mon Sep 17 00:00:00 2001 From: Christoph Dorn Date: Wed, 14 May 2014 00:54:40 -0700 Subject: [PATCH 2/3] working basics --- package.json | 4 ++++ server.js | 32 +++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 11585f5..38c65e8 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "pm": "npm", "dependencies": { + "glob": "^3.2.9", "smi.cli": "0.x" }, "scripts": { @@ -26,6 +27,9 @@ }, "pio.deploy.converter": { "name": "nodejs-server" + }, + "io.pinf.server.www": { + "documentRootPath": "." } } } \ No newline at end of file diff --git a/server.js b/server.js index 1e8e88f..f7638a8 100644 --- a/server.js +++ b/server.js @@ -1,2 +1,32 @@ -require("io.pinf.server.www").for(module, __dirname); +const GLOB = require("glob"); +const SERVER = require("io.pinf.server.www"); + + +SERVER.for(module, __dirname, function(app) { + + app.get(/^\/$/, function (req, res, next) { + return GLOB("*/*/*.html", { + cwd: __dirname + }, function (err, paths) { + if (err) return next(err); + + var payload = []; + payload.push(''); + + payload = payload.join("\n"); + + res.writeHead(200, { + "Content-Type": "text/html", + "Content-Length": payload.length + }); + + return res.end(payload); + }); + }); + +}); From 5db45f4944244bf132579fe138a3c48708510c2a Mon Sep 17 00:00:00 2001 From: Christoph Dorn Date: Wed, 14 May 2014 01:11:15 -0700 Subject: [PATCH 3/3] heading --- server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server.js b/server.js index f7638a8..4681f57 100644 --- a/server.js +++ b/server.js @@ -12,6 +12,7 @@ SERVER.for(module, __dirname, function(app) { if (err) return next(err); var payload = []; + payload.push('

Manual Firebug Tests

'); payload.push('
    '); paths.forEach(function(path) { payload.push('
  • ' + path + '
  • ');