ng-annotate-loader
Webpack loader to annotate angular applications. Generates a sourcemaps as well.
Installation
npm install --save-dev ng-annotate-loader
Usage:
module: {
loaders: [
{
test: /src.*\.js$/,
use: [{ loader: 'ng-annotate-loader' }],
}
]
}
Passing parameters:
{
test: /src.*\.js$/,
use: [
{
loader: 'ng-annotate-loader',
options: {
add: false,
map: false,
}
}
]
}
More about ng-annotate
parameters
Using ng-annotate plugins:
{
test: /src.*\.js$/,
use: [
{
loader: 'ng-annotate-loader',
options: {
plugin: ['ng-annotate-adf-plugin']
}
}
]
}
Using a fork of ng-annotate:
{
test: /src.*\.js$/,
use: [
{
loader: 'ng-annotate-loader',
options: {
ngAnnotate: 'my-ng-annotate-fork'
}
}
]
}
babel
for example:
Works great with js compilers, {
test: /src.*\.js$/,
use: [
{ loader: 'ng-annotate-loader' },
{ loader: 'babel-loader' },
]
},
Contributing
Compiling examples and run acceptance test
Run on the root folder:
npm install
npm test