A browserify transform that uses ng-annotate to add dependency injection annotations to your AngularJS source code, preparing it for minification.
Usagebrowserify -t browserify-ngannotate app.js > bundle.js
Options
Provided options are passed through to ng-annotate. The add
option defaults to true
.
For example, to remove annotations, one could use the following:
browserify -t [ browserify-ngannotate --no-add --remove ] app.js > bundle.js
Source maps
Sourcemapping will be enabled automatically when browserify is in debug
mode:
File extensionsbrowserify --debug -t browserify-ngannotate app.js > bundle.js
Define the filetypes to transform. Prevents other resouces like .json or .css from being processed, if you are including them with require().
This is done using the --x
or --ext
transform options:
browserify -t [ browserify-ngannotate --x .coffee ] app.js > bundle.js
The above example will only annotate .js and .coffee files, ignoring the rest.
Installnpm install browserify-ngannotate --save
License
MIT
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4