Hook up the new FxA JS client. #204
Conversation
shane-tomlinson
commented
Jan 9, 2014
|
|
fixes #204 |
| @@ -4,7 +4,7 @@ | |||
| "description": "Firefox Accounts Content Server", | |||
| "scripts": { | |||
| "start": "grunt server", | |||
| "postinstall": "bower install", | |||
| "postinstall": "bower install;cd app/bower_components/fxa-js-client;npm install;grunt build", | |||
vladikoff
Jan 9, 2014
Contributor
I'm wondering if there is a better solution for this.
We don't want to commit library builds into fxa-js-client.
However we need a way to just get the latest version of the lib from some published source.
Maybe a release git branch (where the branch only has 2 library files)? or somehow grab the file from GitHub releases?
I'm wondering if there is a better solution for this.
We don't want to commit library builds into fxa-js-client.
However we need a way to just get the latest version of the lib from some published source.
Maybe a release git branch (where the branch only has 2 library files)? or somehow grab the file from GitHub releases?
zaach
Jan 9, 2014
Contributor
If we can automate that process, 👍 .
If we can automate that process,
shane-tomlinson
Jan 9, 2014
Author
Member
I am all for checking out a release branch that contains the pre-built files, if as @zaach says, that process can be automated - installing the deps to generate the build on every checkin takes a significant amount of time on travis.
I am all for checking out a release branch that contains the pre-built files, if as @zaach says, that process can be automated - installing the deps to generate the build on every checkin takes a significant amount of time on travis.
* Update bower config to fetch the new FxA JS client. * In postinstall npm command, install the FxA JS client's dependencies and do a build so the client is available. * Create a light wrapper around the FxaJSClient to reduce boilerplate code. * Use the fxa-js-client from the bower install, get rid of picl-gherkin
|
@zaach - How're you feeling about this one? |
| .then(function (client) { | ||
| Session.email = email; | ||
| Session.token = client.sessionToken; | ||
| var client = new FxaClient(); |
zaach
Jan 9, 2014
Contributor
Don't we still need the server URL from the configuration?
Don't we still need the server URL from the configuration?
zaach
Jan 9, 2014
Contributor
Ah, cool. 👍
Ah, cool.
| "intern-geezer": "1.3.2", | ||
| "jshint-stylish": "~0.1.4", | ||
| "grunt-preprocess": "~3.0.1" | ||
| "grunt-preprocess": "~3.0.1", | ||
| "xmlhttprequest": "~1.6.0" |
zaach
Jan 9, 2014
Contributor
I had to make a patch to xmlhttprequest to support xhr.onerror, so gherkin uses this line in package.json: "xmlhttprequest": "git://github.com/zaach/node-XMLHttpRequest.git#onerror",.
I had to make a patch to xmlhttprequest to support xhr.onerror, so gherkin uses this line in package.json: "xmlhttprequest": "git://github.com/zaach/node-XMLHttpRequest.git#onerror",.
| @@ -9,7 +9,7 @@ require.config({ | |||
| jquery: '../bower_components/jquery/jquery', | |||
| backbone: '../bower_components/backbone/backbone', | |||
| underscore: '../bower_components/underscore/underscore', | |||
| gherkin: '../bower_components/fxa-js-client-old/web/bundle', | |||
| gherkin: '../bower_components/fxa-js-client/build/fxa-client', | |||
zaach
Jan 9, 2014
Contributor
We should replace references to gherkin with fxaClient. Sorry gherkin.
We should replace references to gherkin with fxaClient. Sorry gherkin.
ckarlof
Jan 9, 2014
Contributor
Sorry gherkin.
Noooooooooo!
Sorry gherkin.
Noooooooooo!
|
@shane-tomlinson I left a couple of comments, but this looks good! |
* Rename gherkin to fxaClient * Use the special xmlhttprequest that supports .onerror * Rename the FxaClient wrapper to FxaClientWrapper internally
|
|