gulp-ng-module-sort

Sorts AngularJS files in a given path(s) in preparation for script concatenation.

Added by: Sam Deering

GitHub

Repository

gonzoray/gulp-ng-module-sort

Stats

Stars: 0

Watchers: 0

Forks: 0

Author

GonzoRay
GonzoRay

Module Description

INFORMATION

Packagegulp-ng-module-sort
Description Sorts AngularJS files in a given directory(s) in preparation for script concatenation.
Node Version >= 0.10

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.

Module stats last updated: 2015-04-19 02:10:27

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!