text: module.exports = function (grunt) {
  
    grunt.loadNpmTasks('grunt-karma');
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-conventional-changelog');
  
    // Default task.
    grunt.registerTask('default', ['jshint', 'karma']);
  
    var testConfig = function(configFile, customOptions) {
      var options = { configFile: configFile, keepalive: true };
      var travisOptions = process.env.TRAVIS && { browsers: ['Firefox'], reporters: 'dots' };
      return grunt.util._.extend(options, customOptions, travisOptions);
    };
  
    // Project configuration.
    grunt.initConfig({
      karma: {
        options: testConfig('test/test.conf.js'),
        singleRun: true
      },
      jshint:{
        files:['src/**/*.js', 'test/**/*.spec.js', 'demo/**/*.js'],
        options: {
            jshintrc: '.jshintrc'
        }
      },
      changelog: {
        options: {
          dest: 'CHANGELOG.md'
        }
      }
    });
  
  };
  