angular-annotate-asset-pipeline

AngularJS Annotation extension for the Asset Pipeline Library.

License

License

The Apache Software License, Version 2.0
Categories

Categories

Angular User Interface Web Frameworks
GroupId

GroupId

com.craigburke.angular
ArtifactId

ArtifactId

angular-annotate-asset-pipeline
Last Version

Last Version

2.4.1
Release Date

Release Date

Type

Type

jar
Description

Description

angular-annotate-asset-pipeline
AngularJS Annotation extension for the Asset Pipeline Library.
Project URL

Project URL

https://github.com/craigburke/angular-annotate-asset-pipeline
Source Code Management

Source Code Management

https://github.com/craigburke/angular-annotate-asset-pipeline

Download angular-annotate-asset-pipeline

How to add to project

<!-- https://jarcasting.com/artifacts/com.craigburke.angular/angular-annotate-asset-pipeline/ -->
<dependency>
    <groupId>com.craigburke.angular</groupId>
    <artifactId>angular-annotate-asset-pipeline</artifactId>
    <version>2.4.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.craigburke.angular/angular-annotate-asset-pipeline/
implementation 'com.craigburke.angular:angular-annotate-asset-pipeline:2.4.1'
// https://jarcasting.com/artifacts/com.craigburke.angular/angular-annotate-asset-pipeline/
implementation ("com.craigburke.angular:angular-annotate-asset-pipeline:2.4.1")
'com.craigburke.angular:angular-annotate-asset-pipeline:jar:2.4.1'
<dependency org="com.craigburke.angular" name="angular-annotate-asset-pipeline" rev="2.4.1">
  <artifact name="angular-annotate-asset-pipeline" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.craigburke.angular', module='angular-annotate-asset-pipeline', version='2.4.1')
)
libraryDependencies += "com.craigburke.angular" % "angular-annotate-asset-pipeline" % "2.4.1"
[com.craigburke.angular/angular-annotate-asset-pipeline "2.4.1"]

Dependencies

provided (2)

Group / Artifact Type Version
com.bertramlabs.plugins : asset-pipeline-core jar 2.0.12
org.codehaus.groovy : groovy-all jar 2.0.7

runtime (1)

Group / Artifact Type Version
com.craigburke.asset : javascript-core jar 0.3.0

Project Modules

There are no modules declared in this project.

AngularJs Annotate Asset-Pipeline

The angular-annotate-asset-pipeline is an Asset Pipeline module that provides annotations for dependecy injection to allow angular JavaScript or CofeeScript files to be minified in Gradle and Grails projects.

Getting started

Gradle / Grails 3

build.gradle
plugins {
    id 'com.bertramlabs.asset-pipeline' version '2.5.0'
}

dependencies {
    assets 'com.craigburke.angular:angular-annotate-asset-pipeline:2.4.1'
}

Grails 2

Add the plugin to your BuildConfig.groovy:

BuildConfig.groovy
plugins {
    runtime ":angular-annotate-asset-pipeline:2.4.1"
}

How it works

Since the parameter names are significant for AngularJS to do dependency injection and most minifiers rename parameters, you have to use inline annotations. See A Note on Minification

This plugin uses ng-annotate v1.2.1 to add those inline annotations and make your angular files safe to minify.

For example this

function IndexController($scope) {
    $scope.message = "Hello world";
};

Will be automatically annotated like so:

function IndexController($scope) {
    $scope.message = "Hello world";
};
IndexController.$inject = ["$scope"];

Contributions

Thank you to the following people who have made major contributions to this module in terms of both feedback and code:

Versions

Version
2.4.1
2.4.0
2.2.3
2.2.2
2.2.1
2.2.0
2.1.2
2.1.1
2.1.0
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1