swh:1:snp:3af1a03cd091600016317ad7197cfc7dfd1319c7
Raw File
Tip revision: 43df929f674e06d97919c2ba5a589afc93c0a59b authored by Andreas Stuhlmüller on 25 March 2015, 22:24:25 UTC
Update README.md
Tip revision: 43df929
Gruntfile.js
'use strict';

var jslintSettings = {
  options: {
    flags: [
      '--flagfile .gjslintrc'
    ],
    reporter: {
      name: 'console'
    },
    force: false
  },
  lib: {
    src: ['src/*.js', 'src/header.wppl', 'src/analysis/*.js', 'src/transforms/*.js',
          'src/inference/*.js', 'Gruntfile.js']
  },
  test: {
    src: ['tests/*.js']
  },
  wppl: {
    src: ['tests/test-data/*.wppl', 'examples/*.wppl']
  }
};

module.exports = function(grunt) {
  grunt.initConfig({
    nodeunit: {
      all: ['tests/*.js']
    },
    jshint: {
      files: ['Gruntfile.js', 'src/*.js', 'src/header.wppl', 'tests/*.js', 'src/analysis/*.js',
              'src/transforms/*.js', 'src/inference/*.js'],
      options: {
        nonew: true,
        curly: true,
        noarg: true,
        trailing: true,
        forin: true,
        noempty: true,
        node: true,
        eqeqeq: true,
        strict: true,
        evil: true,
        undef: true,
        bitwise: true,
        browser: true,
        gcl: true
      }
    },
    gjslint: jslintSettings,
    fixjsstyle: jslintSettings
  });

  grunt.loadNpmTasks('grunt-gjslint');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-nodeunit');

  grunt.registerTask('default', ['nodeunit', 'gjslint']);
  grunt.registerTask('test', ['nodeunit']);
  grunt.registerTask('lint', ['gjslint']);
  grunt.registerTask('jshint', ['jshint']);
  grunt.registerTask('fixstyle', ['fixjsstyle']);
};
back to top