Skip to content
This repository was archived by the owner on Jul 4, 2023. It is now read-only.

Commit 2049572

Browse files
author
Jesse Zhang
committed
refresh (needs docs)
1 parent ab0c3c5 commit 2049572

File tree

12 files changed

+913
-671
lines changed

12 files changed

+913
-671
lines changed

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ Misc:
6868
---
6969
## Notes
7070
#### Automatically Required Files
71-
* All parsed files containing `angular.module(...).run(...)` and `angular.module(...).config(...)` will be required and treated like a *seed* file.
72-
* Parsed files that are depended on by a *seed* file will be required. This includes *services/factories/controllers/etc.*, *templates*, *filters*, and *animations*.
71+
TODO
7372

7473
#### Enforced Conventions:
7574
* Must use the `angular.module` for defining items
@@ -97,7 +96,13 @@ Misc:
9796
```
9897
module.exports = {
9998
seed: [
100-
"./index.html.ejs"
99+
"./index.html.ejs",
100+
101+
"./shared/app/app.js",
102+
"./shared/app/routes.js",
103+
104+
"./local/app/app.js",
105+
"./local/app/routes.js"
101106
],
102107
options: {
103108
parseExclude: [
@@ -241,7 +246,6 @@ gulp.task("default", function () {
241246
```
242247

243248
##### shared/app/app.js (local/app/app.js can be similar)
244-
This file is automatically included because of the `angular.module(...).run(...)`
245249
```
246250
angular.module("myAngularApp").run(["SomeService", "SomeLibrary", function (SomeService, SomeLibrary) {
247251
// SomeService will be looked for and included in services.js
@@ -250,7 +254,6 @@ angular.module("myAngularApp").run(["SomeService", "SomeLibrary", function (Some
250254
```
251255

252256
##### shared/app/routes.js (local/app/routes.js can be similar)
253-
This file is automatically included because of the `angular.module(...).config(...)`
254257
```
255258
angular.module("myAngularApp").config(["$stateProvider", "$urlRouterProvider",
256259
function ($stateProvider, $urlRouterProvider) {
@@ -282,15 +285,17 @@ angular.module("myAngularApp").config(["$stateProvider", "$urlRouterProvider",
282285
```
283286

284287
##### shared/libs-optional/myLib/lib.js (local/libs-optional/myLib/lib.js can be similar)
285-
This file is included because of the `SomeLibrary` dependency in `shared/app/app.js`.
286288
```
287289
angular.module("myLib", []).service("SomeLibrary", function () {
288290
return window.someGlobalLibrary;
289291
});
290292
```
291293

292294
##### shared/libs-optional/myLib/includes/nonAngularLib.js
293-
This file is included because `SomeLibrary` is required and this file is within the optional libs include folder.
294295
```
295-
var someNonAngularLib = function () {};
296+
angular.module("myLib", []).service("SomeLibrary", function () {
297+
// This will be included because of "shared/app/app.js"
298+
// The module will be included as well!
299+
return window.someGlobalLibrary;
300+
});
296301
```

0 commit comments

Comments
 (0)