UNPKG

998 BMarkdownView Raw
1# ng-annotate-loader [![Build Status](https://img.shields.io/travis/huston007/ng-annotate-loader.svg?style=flat-square)](https://travis-ci.org/huston007/ng-annotate-loader)
2Webpack loader to annotate angular applications. Generates a sourcemaps as well.
3
4## Usage:
5
6```
7module: {
8 loaders: [
9 {test: /src.*\.js$/, loaders: ['ng-annotate']},
10 ]
11 }
12```
13
14#### Passing parameters:
15
16```
17 {test: /src.*\.js$/, loaders: ['ng-annotate?add=false&map=false']}
18```
19
20[More about `ng-annotate` parameters](https://github.com/olov/ng-annotate#library-api)
21
22#### Using ng-annotate plugins:
23
24```
25 {test: /src.*\.js$/, loaders: ['ng-annotate?plugin[]=ng-annotate-adf-plugin']}
26```
27
28#### Works great with js compilers, `babel` for example:
29
30```
31 {test: /src.*\.js$/, loaders: ['ng-annotate', 'babel-loader']},
32```
33
34## Contributing
35#### Compiling examples and run acceptance test
36Run on the root folder:
37```
38npm install
39npm test
40```
41
42[Using loaders](http://webpack.github.io/docs/using-loaders.html)