Skip to content

Latest commit

 

History

History
98 lines (79 loc) · 1.47 KB

README.md

File metadata and controls

98 lines (79 loc) · 1.47 KB

ng-annotate-loader Build Status

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'
      }
    }
  ]
}

Works great with js compilers, babel for example:

{
  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