1.0.6 • Published 8 years ago

grunt-build-info-angular-injector v1.0.6

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

grunt-build-info-angular-injector

Allows you to inject information about the build into angular. Such as the branch the build came from, the version and the build number.

Install

$ npm install grunt-build-info-angular-injector --save

Usage

grunt.loadNpmTasks('grunt-build-info-angular-injector');

grunt.initConfig({
  injectBuildInfo: {
    module: 'my.angular.module',
    providerName: 'myBuildInfoProvider',
    target: 'src/buildInfoService.js'
  }
});

grunt.registerTask('default', ['injectBuildInfo']);

grunt default --buildNumber=${env:BUILD_NUMBER} --branch=${env:GIT_BRANCH} --buildName=${env:JOB_NAME}

Options

These are the configuration options you can pass to grunt.

module

Type: string Default: buildInfo

The name of the already existing angular module to attach this provider to.

providerName

Type: string Default: buildInfo

The name the provider will have within your application, ie. the name of the injectable.

target

Type: string Default: src/buildInfoService.js

The target file for the provider. This will be created, you will still have to include it in your template.

Parameters

These are the command line parameters which you can call grunt with to be injected into the provider.

  • buildNumber e.g. --buildNumber=21
  • buildName e.g. --buildName=dev
  • branch e.g. --branch=master
1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago