Skip to content

Grunt plugin for ng-attr-hint (A static linting tool for angular ng directives)

License

Notifications You must be signed in to change notification settings

senthilporunan/grunt-ng-attr-hint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-ng-attr-hint

npm version license

A static linting tool for angular ng directives

Demo

ng-attr-hint

Getting Started

This plugin requires Grunt.

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-ng-attr-hint --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-ng-attr-hint');

The "ng-attr-hint" task

Overview

In your project's Gruntfile, add a section named ng-attr-hint to the data object passed into grunt.initConfig().

grunt.initConfig({
  'ng-attr-hint': {
      'your_target': {
          options: {
            // Optional field
            // Task-specific options go here.
          },
          files: {
            // Target-specific file lists and/or options go here.
          }
        }
    });

Usage Examples

Default Options

In this example, the default options are used to do something with whatever. Options field are not necessary (optional field), just to pass files argument with required fileNames in it.

grunt.initConfig({
  'ng-attr-hint': {
      'your_target': {
        files:{
          'test/ng-attr-hint-result.txt': ['*.html']
        }
      }
   }
});

Custom Options

In this example, options:skip rule got added. This rule will help to skip specified attributes in the list. files:[] - mandatory field to run rules.

grunt.initConfig({
  'ng-attr-hint': {
      'your_target': {
        options: {
          skip: ['ngInit']
        },
        files: {
          'test/ng-attr-hint-result.txt': ['*.html']
        }
    }
});

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

0.0.1 - Released on 09-AUGUST-2015

License

Copyright (c) 2015 Senthil Porunan. Licensed under the MIT license.

About

Grunt plugin for ng-attr-hint (A static linting tool for angular ng directives)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published