gulp-angular-includes
Builds an includes.(js|coffee)
for your angular app.(js|coffee)
to support functionality-split angularjs projects.
Gulp and browserify have done a great job at making the build process straightforward so I wanted to extend that onto my angular apps.
This basically allows the following:
// app.js'use strict'; var myApp; myApp = angular; ;
Requirements
Your gulpfile needs to have the following:
// gulpfile.jsvar gulp = ;var gutil = ;var angularinc = ;var source = ; var paths = "angular": "./app/*/*/*.js"; gulp;
And your .gitignore should include (assuming the above pathing):
/app/includes.js
Directory Structure
Note: common
is always the first group in the resulting includes file.
.
├── app
│ ├── app.js
│ ├── includes.js
│ ├── common
│ │ ├── controllers
│ │ ├── directives
│ │ ├── filters
│ │ └── services
│ ├── page1
│ │ ├── controllers
│ │ │ ├── FirstCtrl.js
│ │ │ └── SecondCtrl.js
│ │ ├── directives
│ │ │ └── directive1.js
│ │ ├── filters
│ │ │ ├── filter1.js
│ │ │ └── filter2.js
│ │ └── services
│ │ ├── service1.js
│ │ └── service2.js
│ └── page2
│ ├── controllers
│ │ └── ThirdCtrl.js
│ ├── directives
│ │ ├── directive2.js
│ │ └── directive3.js
│ ├── filters
│ │ └── filter3.js
│ └── services
│ └── service3.js
├── partials
├── lib
└── test