ng-annotate-loader

0.7.0 • Public • Published

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

Package Sidebar

Install

npm i ng-annotate-loader

Weekly Downloads

33,985

Version

0.7.0

License

MIT

Unpacked Size

182 kB

Total Files

28

Last publish

Collaborators

  • huston007