Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrey-skl/ng-annotate-loader
Webpack loader to annotate angular applications
https://github.com/andrey-skl/ng-annotate-loader
Last synced: 21 days ago
JSON representation
Webpack loader to annotate angular applications
- Host: GitHub
- URL: https://github.com/andrey-skl/ng-annotate-loader
- Owner: andrey-skl
- License: mit
- Created: 2015-02-05T15:43:06.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T07:33:42.000Z (about 2 years ago)
- Last Synced: 2024-05-17T08:42:23.708Z (8 months ago)
- Language: JavaScript
- Size: 628 KB
- Stars: 120
- Watchers: 4
- Forks: 28
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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)
Webpack loader to annotate angular applications. Generates a sourcemaps as well.
## Installation
```
npm install --save-dev ng-annotate-loader
```## Usage:
```js
module: {
loaders: [
{
test: /src.*\.js$/,
use: [{ loader: 'ng-annotate-loader' }],
}
]
}
```#### Passing parameters:
```js
{
test: /src.*\.js$/,
use: [
{
loader: 'ng-annotate-loader',
options: {
add: false,
map: false,
}
}
]
}
```[More about `ng-annotate` parameters](https://github.com/olov/ng-annotate/blob/master/OPTIONS.md)
#### Using ng-annotate plugins:
```js
{
test: /src.*\.js$/,
use: [
{
loader: 'ng-annotate-loader',
options: {
plugin: ['ng-annotate-adf-plugin']
}
}
]
}
```#### Using a fork of ng-annotate:
```js
{
test: /src.*\.js$/,
use: [
{
loader: 'ng-annotate-loader',
options: {
ngAnnotate: 'my-ng-annotate-fork'
}
}
]
}
```#### Works great with js compilers, `babel` for example:
```js
{
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
```[Using loaders](https://webpack.js.org/concepts/loaders/)