Skip to content
/ ngbmin Public

Angular function-based injection to array-based injection transform for browserify and the command line.

Notifications You must be signed in to change notification settings

spion/ngbmin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ngbmin

An angular minifying pre-processor that doesn't try to be too smart.

how it works

Instead of trying to detect which functions it should or shouldn't transform, ngbmin uses this simple rule:

All named function expressions that end with '$ng' will be transformed to the array syntax.

Example:

var factory = function myModule$ng($scope, $http) {
};
angular.module('m').factory('f', factory);

Output:

var factory = ['$scope', '$http', function myModule$ng($scope, $http) {
}];
angular.module('m').factory('f', factory);

Usage

From the command-line (recommended):

ngbmin < input.js > output.js

With browserify

browserify -t ngbmin main.js -o main.bundle.js

license

MIT

About

Angular function-based injection to array-based injection transform for browserify and the command line.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published