0.0.3 • Published 8 years ago

gulp-ng-module-sort v0.0.3

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

INFORMATION

DESCRIPTION

The gulp-ng-module-sort module is intended to be used to order AngularJS modules for inclusion in a concatenation routine such as gulp-concat. This module assumes a directory stucture where the module.js file lives directly under a matching directory.

USAGE

	var ngModuleSort = require('gulp-ng-module-sort');
    var concat = require('gulp-concat');

	gulp.task('angular-scripts', function() {
		return gulp.src('./src/app/**/*.js')
		    .pipe(ngModuleSort())
		    .pipe(concat('angularAppScripts.js'))
		    .pipe(gulp.dest('./dist/'));
	});

CONVENTION

Assumes this directory structure convention:

|——— src/
|   |——— app/
|       |——— module1/
|           |——— sub-module1/
|               |——— sub-module1.js
|           |——— module1.js
|       |——— module2/
|           |——— sub-module2/
|               |——— sub-module2.js
|           |——— sub-module3/
|               |——— sub-module3.js
|           |——— module2.js
|   |——— app.js

Where app.js is the root Angular module used in ng-app.