Add ESLint.
[mootools.git] / Grunt / options / options.js
blobf407689d3ca8a423a569263d70a3f4f274821893
1 'use strict';
3 var path = require('path');
4 var browsers = require('./browsers');
6 module.exports = function(grunt){
7         var dir = grunt.config.get('environment.dir'),
8                 build = grunt.config.get('environment.build'),
9                 travis = grunt.config.get('environment.travis'),
10                 sauceLabs = grunt.config.get('environment.sauceLabs');
12         var config = {
13                 karma: {
14                         options: {
15                                 singleRun: true,
16                                 captureTimeout: 60000 * 2,
17                                 frameworks: ['expect', 'mocha', 'sinon', 'syn'],
18                                 plugins: ['karma-*', path.resolve('Grunt/plugins/karma/syn')],
19                                 reporters: ['progress'],
20                                 browsers: ['PhantomJS'],
21                                 sauceLabs: {
22                                         username: sauceLabs.username,
23                                         accessKey: sauceLabs.accessKey,
24                                         testName: 'MooTools-Core. Build: ' + travis.build + '. Browser: ' + travis.browser
25                                 },
26                                 customLaunchers: browsers
27                         }
28                 },
29                 mochaTest: {
30                         options: {
31                                 reporter: 'dot',
32                                 require: function(){
33                                         global.expect = require('expect.js');
34                                         global.sinon = require('sinon');
35                                 }
36                         }
37                 },
38                 packager: {
39                         options: {
40                                 name: 'Core'
41                         }
42                 },
43                 uglify: {
44                         options: {
45                                 mangle: false,
46                                 compress: true,
47                                 preserveComments: 'some'
48                         }
49                 },
50                 eslint: {
51                         options: {
52                                 rulePaths: ['Grunt/plugins/eslint/rules']
53                         }
54                 }
55         };
57         return config;