Initial Restructure for Modularity
[dlux.git] / dlux-web / src / README.md
1 # The `src` Directory
2
3 ## Overview
4
5 The `src/` directory contains all code used in the application along with all
6 tests of such code.
7
8 ```
9 src/
10   |- app/
11   |  |- about/
12   |  |- home/
13   |  |- app.js
14   |  |- app.spec.js
15   |- assets/
16   |- common/
17   |  |- plusOne/
18   |- less/
19   |  |- main.less
20   |  |- variables.less
21   |- index.html
22 ```
23
24 - `src/app/` - application-specific code, i.e. code not likely to be reused in
25   another application. [Read more »](app/README.md)
26 - `src/assets/` - static files like fonts and images. 
27   [Read more »](assets/README.md)
28 - `src/common/` - third-party libraries or components likely to be reused in
29   another application. [Read more »](common/README.md)
30 - `src/less/` - LESS CSS files. [Read more »](less/README.md)
31 - `src/index.html` - this is the HTML document of the single-page application.
32   See below.
33
34 See each directory for a detailed explanation.
35
36 ## `index.html`
37
38 The `index.html` file is the HTML document of the single-page application (SPA)
39 that should contain all markup that applies to everything in the app, such as
40 the header and footer. It declares with `ngApp` that this is `ngBoilerplate`,
41 specifies the main `AppCtrl` controller, and contains the `ngView` directive
42 into which route templates are placed.
43
44 Unlike any other HTML document (e.g. the templates), `index.html` is compiled as
45 a Grunt template, so variables from `Gruntfile.js` and `package.json` can be
46 referenced from within it. Changing `name` in `package.json` from
47 "ng-boilerplate" will rename the resultant CSS and JavaScript placed in `build/`,
48 so this HTML references them by variable for convenience.