zurb/foundation-apps — pull request #296 by gakimball (2014-12-12 00:27:16+00:00)
Title: Gulpfile refactor

We just [reorganized the Gulpfile](https://github.com/zurb/foundation-apps-template/pull/8) used in the template stack, so let's do that here, and then some. Here's what's up:
- Organized the Gulpfile into categories (files, Sass, JavaScript, etc.)
- Added comments for every task
- Renamed the tasks to all use a similar naming scheme
- Upgraded to `gulp-ruby-sass` 1.0 alpha
- Separated framework JavaScript from docs-specific code
- Framework code is compiled to `foundation.js`
- Docs code is compiled to `app.js`
- Added a task to deploy compiled JS and Sass to our server, where it will be picked up by a CDN

It seems to pretty much work, although I get this error in the documentation:

```
Error: [ng:areq] Argument 'DefaultController' is not a function, got undefined
http://errors.angularjs.org/1.3.5/ng/areq?p0=DefaultController&p1=not%20aNaNunction%2C%20got%20undefined
at http://localhost:8080/assets/js/foundation.js:5:654
at assertArg (http://localhost:8080/assets/js/foundation.js:5:12013)
at assertArgFn (http://localhost:8080/assets/js/foundation.js:5:12215)
at http://localhost:8080/assets/js/foundation.js:7:9848
at http://localhost:8080/assets/js/foundation.js:15:4165
at invokeLinkFn (http://localhost:8080/assets/js/foundation.js:7:4672)
at nodeLinkFn (http://localhost:8080/assets/js/foundation.js:6:22977)
at compositeLinkFn (http://localhost:8080/assets/js/foundation.js:6:12817)
at http://localhost:8080/assets/js/foundation.js:6:11488
at updateView (http://localhost:8080/assets/js/foundation.js:15:2951)
```

Leftover things:
- [ ] Move arrays of file paths (especially the JavaScript imports) into their own variable, to be shared by the `javascript` and `deploy:cdn` tasks
- [ ] Get up from my desk and ask somebody for help setting up the directory for the CDN