Skip to content

Commit a104abe

Browse files
committed
Address issue gocardless#7
1 parent 5394762 commit a104abe

File tree

1 file changed

+31
-5
lines changed

1 file changed

+31
-5
lines changed

README.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Table of Contents
44
1. [High-level Goals](#high-level-goals)
5+
2. [Third-party Dependencies](#third-party-dependencies)
56
2. [Directory and File Structure](#directory-and-file-structure)
67
3. [Parts of Angular](#parts-of-angular)
78
4. [General Patterns and Anti-patterns](#general-patterns-and-anti-patterns)
@@ -16,6 +17,31 @@ The principles we use to guide low-level decision making are:
1617
4. Think forward – ES6 and Web Components (Angular 2.0).
1718
5. Know [when to deviate](http://legacy.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds) from the style guide.
1819

20+
## Third-party Dependencies
21+
22+
1. [SystemJS](https://github.com/systemjs/systemjs)
23+
24+
- _Why_: SystemJS is an ES6 module loader that enables us to load assets in development and transpile ES6 to ES5 in production.
25+
26+
```js
27+
import {DialogControllerModule} from './dialog.controller';
28+
import template from './dialog.template.html!text';
29+
```
30+
31+
2. [Traceur](https://github.com/google/traceur-compiler)
32+
33+
- _Why_: Traceur is the transpiler used by SystemJS.
34+
35+
3. [lodash](https://github.com/lodash/lodash)
36+
37+
- _Why_: lodash is a utility library we use throughout our application. Our use of `_.extend` could be replaced by Angular’s built in method `angular.extend`.
38+
39+
4. [ui-router](https://github.com/angular-ui/ui-router/wiki)
40+
41+
- _Why_: ui-router replaces Angular’s ngRoute module, and is built around states instead of URL routes, enabling nested views. Our use of `$stateProvider` could be replaced by `$routeProvider`.
42+
43+
_Note_: We plan to write about the third-party tools we use at GoCardless. We will provide a link when it’s done.
44+
1945
## Directory and File Structure
2046

2147
We organise our code as follows:
@@ -97,7 +123,7 @@ Rules for using each of the core parts of AngularJS (routes, directives, control
97123

98124
#### Use resolvers to inject data.
99125

100-
_Why_: The page is rendered only when all data is available, which means you don't get any views being rendered without data.
126+
_Why_: The page is rendered only when all data is available. This means views are only rendered once all the required data is available, and you avoid the user seeing any empty views whilst the data is loading.
101127

102128
```js
103129
// Recommended
@@ -815,10 +841,10 @@ _Why_: You should `$scope.$apply()` as close to the asynchronous event binding a
815841

816842
We referred to lots of resources during the creation of this styleguide, including:
817843

818-
- [Todd Motto's styleguide](https://github.com/toddmotto/angularjs-styleguide)
819-
- [John Papa's styleguide](https://github.com/johnpapa/angularjs-styleguide)
820-
- [Minko Gechev's styleguide](https://github.com/mgechev/angularjs-style-guide)
844+
- [Todd Mottos styleguide](https://github.com/toddmotto/angularjs-styleguide)
845+
- [John Papas styleguide](https://github.com/johnpapa/angularjs-styleguide)
846+
- [Minko Gechevs styleguide](https://github.com/mgechev/angularjs-style-guide)
821847
- [Google AngularJS and Closure styleguide](http://google-styleguide.googlecode.com/svn/trunk/angularjs-google-style.html)
822848
- [The Angular.js GitHub wiki](https://github.com/angular/angular.js/wiki)
823-
- [Digging into Angular's "Controller as" syntax, by Todd Motto](http://toddmotto.com/digging-into-angulars-controller-as-syntax/)
849+
- [Digging into Angular’s “Controller as syntax, by Todd Motto](http://toddmotto.com/digging-into-angulars-controller-as-syntax/)
824850
- [Python PEP 8 Styleguide](http://legacy.python.org/dev/peps/pep-0008/)

0 commit comments

Comments
 (0)