We have two existing marionette client "drivers" to handle tcp requests to the marionette server
We'd now like to add an additional driver that handles request asynchronicity through promises.
var Abstract = require('./abstract'); | |
var tcp = require('./tcp'); | |
function Promises(options) { | |
this.tcp = new Tcp(options); | |
} | |
Promises.prototype.connect = function() { | |
var tcp = this.tcp; | |
return new Promise(function(resolve, reject) { |
gareth@albee:~/Documents/gaia$ ping us.archive.ubuntu.com | |
PING us.archive.ubuntu.com (91.189.91.23) 56(84) bytes of data. | |
64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=1 ttl=48 time=54.0 ms | |
64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=2 ttl=48 time=62.4 ms | |
64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=3 ttl=48 time=85.9 ms | |
64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=4 ttl=48 time=52.9 ms | |
64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=5 ttl=48 time=93.0 ms | |
^C | |
--- us.archive.ubuntu.com ping statistics --- | |
5 packets transmitted, 5 received, 0% packet loss, time 4004ms |
[preprocessor] FIREFOX_SYNC false /home/gareth/Documents/gaia/build_stage/settings,elements,root.html | |
[preprocessor] FIREFOX_SYNC false /home/gareth/Documents/gaia/build_stage/settings,index.html | |
[preprocessor] remove file: /home/gareth/Documents/gaia/build_stage/settings/elements/firefox_sync.html | |
[preprocessor] remove file: /home/gareth/Documents/gaia/build_stage/settings/js/panels/firefox_sync/firefox_sync.js | |
[preprocessor] remove file: /home/gareth/Documents/gaia/build_stage/settings/js/panels/firefox_sync/panel.js | |
[preprocessor] remove file: /home/gareth/Documents/gaia/build_stage/settings/js/modules/sync_manager_bridge.js | |
[preprocessor] remove file: /home/gareth/Documents/gaia/build_stage/settings/style/images/fxsync_error.png | |
[preprocessor] remove file: /home/gareth/Documents/gaia/build_stage/settings/style/images/fxsync_intro.png | |
[preprocessor] remove file: /home/gareth/Documents/gaia/build_stage/settings/test/unit/panels/firefox_sync/manager_bridge_test.js | |
[preprocessor] remove file: /home/gareth/Doc |
We have two existing marionette client "drivers" to handle tcp requests to the marionette server
We'd now like to add an additional driver that handles request asynchronicity through promises.
/** | |
* Usage: | |
* | |
* let router = new Router(); | |
* // All of these calls to router.state are declaring that when the | |
* // url matches the first argument, we should instantiate a ReactElement | |
* // from the component class given by the second argument. | |
* // Pulls parameters out of url and sets them as component props. | |
* router.state('/posts', ListPosts); | |
* router.state('/posts/:id', ShowPost); |
MAIN_FILES = $(shell find src/ui -name "*.js") | |
MAIN_ES5 = $(patsubst src/ui/%.js, build/ui/%.js, $(MAIN_FILES)) | |
WORKER_FILES = $(shell find src/service -name "*.js") | |
WORKER_ES5 = $(patsubst src/service/%.js, build/service/%.js, $(WORKER_FILES)) | |
.PHONY: all | |
all: ui.js service.js | |
.PHONY: clean | |
clean: |
autonome/Github-Bugzilla-Tweaks | |
broofa/node-uuid | |
bryanduxbury/hank | |
chaijs/chai | |
fruux/sabre-dav | |
gaia-components/threads | |
gittup/tup | |
jhford/uplift | |
jrburke/adapt-pkg-main | |
Kozea/Radicale |
gareth@albee:~/Documents/gaia/b2g$ cat application.ini | |
; This file is not used. If you modify it and want the application to use | |
; your modifications, start with the "-app /path/to/application.ini" | |
; argument. | |
[App] | |
Vendor=Mozilla | |
Name=B2G | |
RemotingName=b2g | |
Version=42.0a1 | |
BuildID=20150701122254 |
gareth@albee:~/Documents/gaia$ cat ~/.npmrc | |
prefix=/home/gareth/.npm |
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get -y install g++ git python-pip | |
# install nodejs | |
git clone https://github.com/joyent/node | |
git checkout origin/v0.12.4-release | |
cd node | |
./configure |