mozilla/fxa-content-server — pull request #141 by pdehaan (2013-12-12 01:24:16+00:00)
Title: Refactoring Gruntfile.js and putting tasks in separate files

Separating tasks out from the `Gruntfile.js` file and into separate files in the `./grunttasks/` folder. I also added a better formatter for the JSHint output (jshint-stylish) and added a custom Grunt task to check for copyrights in files.

There are still JSHint errors and missing copyrights which are preventing clean Grunt runs, but I can submit separate PRs for those issues in case we want to reject them or whatevah.

```
$ grunt jshint
Running "jshint:grunt" (jshint) task

✔ No problems

Running "jshint:all" (jshint) task

app/scripts/views/sign_in.js
line 22 col 66 Expected '{' and instead saw 'return'.

app/scripts/views/sign_up.js
line 22 col 66 Expected '{' and instead saw 'return'.

tests/functional/create_account.js
line 6 col 3 Missing "use strict" statement.
line 46 col 15 Missing semicolon.

tests/functional/login.js
line 6 col 3 Missing "use strict" statement.
line 46 col 15 Missing semicolon.

tests/intern_functional.js
line 5 col 3 Missing "use strict" statement.

tests/intern_remote.js
line 7 col 3 Missing "use strict" statement.

tests/tdd/assertion_service.js
line 11 col 3 Missing "use strict" statement.
line 11 col 3 Don't use 'with'.
line 101 col 35 Strings must use singlequote.
line 117 col 78 'rk' used out of scope.
line 127 col 25 'components' used out of scope.
line 128 col 25 'components' used out of scope.
line 129 col 25 'components' used out of scope.
line 131 col 26 'components' used out of scope.
line 132 col 17 Expected '{' and instead saw 'dfd'.
line 134 col 26 'components' used out of scope.
line 135 col 17 Expected '{' and instead saw 'dfd'.
line 137 col 19 'components' used out of scope.
line 137 col 44 'components' used out of scope.
line 138 col 17 Expected '{' and instead saw 'dfd'.
line 140 col 19 'components' used out of scope.
line 140 col 45 'components' used out of scope.
line 141 col 17 Expected '{' and instead saw 'dfd'.
line 146 col 29 'fxaRootKey' used out of scope.
line 147 col 32 'fullAssertion' used out of scope.
line 148 col 37 'assertionPublicKey' used out of scope.
line 149 col 28 'checkDate' used out of scope.
line 155 col 67 Missing semicolon.
line 180 col 44 Missing semicolon.
line 208 col 50 Missing semicolon.
line 12 col 5 'suite' is not defined.
line 19 col 7 'before' is not defined.
line 22 col 22 'gherkin' is not defined.
line 41 col 7 'beforeEach' is not defined.
line 42 col 32 'AssertionService' is not defined.
line 45 col 7 'test' is not defined.
line 49 col 7 'test' is not defined.
line 61 col 7 'test' is not defined.
line 77 col 7 'test' is not defined.
line 89 col 7 'test' is not defined.
line 33 col 28 'x' is defined but never used.
line 109 col 23 'rk' is defined but never used.
line 117 col 31 'fxaRootKey' is defined but never used.
line 120 col 39 'assertionPublicKey' is defined but never used.
line 122 col 30 'checkDate' is defined but never used.

✖ 47 problems

Warning: Task "jshint:all" failed. Use --force to continue.
```

```
$ grunt copyright
Running "copyright:app" (copyright) task

The following files don't match the specified pattern:
> /This Source Code Form is subject to the terms of the Mozilla Public/

- app/scripts/lib/session.js
- app/scripts/lib/translator.js
- app/scripts/main.js
- app/scripts/router.js
- app/scripts/views/base.js
- app/scripts/views/confirm.js
- app/scripts/views/intro.js
- app/scripts/views/settings.js
- app/scripts/views/sign_in.js
- app/scripts/views/sign_up.js
- tests/functional.js
- tests/functional/create_account.js
- tests/functional/login.js
- tests/intern.js
- tests/intern_functional.js
- tests/intern_remote.js
- tests/tdd.js
- tests/tdd/assertion_service.js
Warning: Task "copyright:app" failed. Use --force to continue.
```