bahmutov/qunit-promises

View on GitHub
Gruntfile.js

Summary

Maintainability
A
1 hr
Test Coverage
/* global module, require */
module.exports = function (grunt) {
  module.require('time-grunt')(grunt);

  grunt.initConfig({

    sync: {
      all: {
        options: {
          sync: ['author', 'name', 'version', 'description', 'homepage', 'license']
        }
      }
    },

    'nice-package': {
      all: {
        options: {
          blankLine: true
        }
      }
    },

    jshint: {
      'options': {
        jshintrc: '.jshintrc',
        reporter: require('jshint-stylish'),
        force: true
      },
      default: {
        'src': [ '*.js', 'test/*.js' ]
      }
    },

    complexity: grunt.file.readJSON('complexity.json'),

    qunit: {
      all: ['index.html']
    },

    'node-qunit': {
      all: {
        deps: './qunit-promises.js',
        code: './qunit-promises.js',
        tests: ['./test/node-tests.js', './test/node-once-tests.js']
      }
    }
  });

  var plugins = module.require('matchdep').filterDev('grunt-*');
  plugins.forEach(grunt.loadNpmTasks);

  grunt.registerTask('default', ['deps-ok', 'nice-package', 'sync',
    'jshint', 'node-qunit', 'qunit', 'complexity']);
};