Giter Club home page Giter Club logo

inject-this-brunch's Introduction

Inject this brunch!

A ng-annotate plugin for brunch.

DEPRECATED: ng-annotate, which this project depends on, is now deprecated. You are advised to use babel-plugin-angularjs-annotate instead.

Why not the other existing things?

Two ng-annotate plugins for brunch already exist: ng-annotate-brunch and ng-annotate-uglify-js-brunch.

Initial reason (turns out to be invalid)

The two existing solutions did not fit my use case because they place the annotating process inside the optimize phase of brunch. This means that annotations were not present in the development build, only in the production build. I want the annotations to be there in dev so I can have ng-strict-di enabled and that will check if the annotations are really all there.

Turns out you can use the plugins.on option in the brunch config to force optimize plugins to run.

Actual reasons

  • You might not need or want to minify at the same stage as annotating so ng-annotate-uglify-js-brunch is out.
  • ng-annotate-brunch does not have source maps support.
  • ng-annotate-brunch does not support an ignore option, which can give a significant speed boost.

Usage

npm install inject-this-brunch

Configuration

plugins: {
  ngAnnotate: {
    // place config here
  }
}

For ng-annotate

The plugin configuration is passed to ng-annotate. By default, the following options are passed: {add: true, remove: true, map: {inFile: <path of input file>}}, i.e. annotations are rebuilt and source maps are generated.

When a configuration is provided in brunch-config.js:

  • add and remove default to true unless they are explicitly set to falsy values.
  • map.inFile is automatically provided unless map is explicitly set to a falsy value.

pattern

Default: /\.js$/

ignore

Default: /^(bower_components|vendor)/

inject-this-brunch's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

soumak77

inject-this-brunch's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.