Firefox Accounts Content Server
JavaScript HTML CSS Shell
Latest commit 56199d1 Feb 23, 2017 @shane-tomlinson shane-tomlinson committed with vladikoff feat(tests): Reload mocha tests whenever source/js changes. (#4752) r…
…=vladikoff,vbudhram

What is the problem?
To run the unit tests while developing, the dev has to leave
their editor, go to the browser tab with the unit tests open,
and refresh the page. That's a big context shift.

How does this fix it?
Add the `grunt watch:livereload` task which forces the mocha
tests to reload any time a test or source file changes.

Do the tests still run w/o the grunt task running?
Yes, but they will not automatically reload whenever
source files change.
Permalink
Failed to load latest commit information.
app feat(mailcheck): enable mailcheck (#4751) r=vladikoff Feb 23, 2017
docs feat(sms): Send SMS view (#4625) r=vladikoff Feb 22, 2017
grunttasks feat(tests): Reload mocha tests whenever source/js changes. (#4752) r… Feb 23, 2017
locale fix(l10n): move l10n install into postinstall (#4498) r=vbudhram Dec 13, 2016
scripts fix(docker): add bower instructions and l10n fix (#4663) Jan 24, 2017
server feat(tests): Reload mocha tests whenever source/js changes. (#4752) r… Feb 23, 2017
tests feat(tests): Reload mocha tests whenever source/js changes. (#4752) r… Feb 23, 2017
.bowerrc chore(build): disable bower analytics Jul 7, 2015
.editorconfig feat(oauth): suggest account to use during sign up if possible Apr 30, 2015
.eslintignore chore(lint): switch from JSHint to ESLint Jun 12, 2015
.eslintrc feat(eslint-plugin-fxa): using 1 repository of eslint rules (#4698) Feb 10, 2017
.gitattributes Generated basic Yeoman project. Dec 4, 2013
.gitignore chore(git): Update .gitignore to support nested .eslintrc files (#4409)… Nov 16, 2016
.htmllintrc chore(htmllint): add htmllint to repo Jul 13, 2015
.nsprc chore(nsp): remove exceptions (#4416) r=pdehaan Nov 16, 2016
.sass-lint.yml chore(sass-lint): add sass linting (#3732) r=vladikoff,pdehaan May 16, 2016
.travis.yml fix(tests): update to support latest Firefox driver (#4442) Dec 28, 2016
AUTHORS Release v0.79.0 Jan 23, 2017
CHANGELOG.md Release v1.81.0 Feb 23, 2017
CONTRIBUTING.md fix(l10n): move l10n install into postinstall (#4498) r=vbudhram Dec 13, 2016
Dockerfile feat(docker): Dockerfile and README update for basic docker developme… Feb 18, 2015
Dockerfile-build fix(build): Add Dockerfile-build which is needed by Circle. (#4662) r=@… Jan 24, 2017
Gruntfile.js chore(build): Include license header at the top of minified main.js Jul 1, 2015
LICENSE Add MPL 2.0 license file. Aug 18, 2014
README.md fix(tests): update to support latest Firefox driver (#4442) Dec 28, 2016
bower.json feat(sms): Send SMS view (#4625) r=vladikoff Feb 22, 2017
circle.yml fix(docker): Start docker service Jan 23, 2017
npm-shrinkwrap.json Release v1.81.0 Feb 23, 2017
package.json Release v1.81.0 Feb 23, 2017

README.md

Firefox Accounts Content Server

Build Status: Travis Build Status: Circle CI Coverage Status

Static server that hosts Firefox Account sign up, sign in, email verification, etc. flows.

Quick Start

Clone the repository, make sure you have required prerequisites installed. Run npm install and npm run start-remote. This will start a local fxa-content-server on http://127.0.0.1:3030 that works with remote Firefox Accounts servers.

If you want to install all Firefox Accounts servers locally follow the instructions on: fxa-local-dev to get a full development setup running. Please note that fxa-local-dev is the preferred way of contributing to Firefox Accounts.

Development Notes

Changes to stylesheets

To have the css resources automatically rebuilt after changes, run grunt sass watch. Now whenever a change is made to the .scss files, the corresponding css resources will be rebuilt.

Changes to scripts and templates

Any changes made to the scripts or the template files will automatically be reflected on page refresh.

Testing

Prerequisites:

Setup

To run tests locally with Selenium:

npm test

To change the default auth server edit server/config/*.json on your deployed instance.

{
  "fxaccount_url": "http://your.auth.server.here.org"
}

Note that testing with Selenium via Docker does not work at present, so all testing must be carried out via your normal operating system's npm & Java tooling.

Grunt Commands

Grunt is used to run common tasks to build, test, and run local servers.

TASK DESCRIPTION
grunt build build production resources. See task source for more documentation
grunt clean remove any built production resources.
grunt lint run ESLint, Sass-lint, amdcheck and JSONLint on client side and testing JavaScript.
grunt sass watch rebuild css resources automatically when changes are made to the .scss files (file needs to be saved).
grunt server run a local server running on port 3030 with development resources.
grunt server:dist run a local server running on port 3030 with production resources. Production resources will be built as part of the task.
grunt test run local Intern tests.
grunt version stamp a new minor version. Updates the version number and creates a new CHANGELOG.md.
grunt version:patch stamp a new patch version. Updates the version number and creates a new CHANGELOG.md.

Servers

License

MPL 2.0