1 | 'use strict';
|
2 |
|
3 | module.exports = function(grunt) {
|
4 |
|
5 | grunt.initConfig({
|
6 |
|
7 |
|
8 | eslint: {
|
9 | files: [
|
10 | 'Gruntfile.js',
|
11 | 'tasks/*.js',
|
12 | 'test/*.js'
|
13 | ]
|
14 | },
|
15 |
|
16 |
|
17 | nodeunit: {
|
18 | files: ['test/*_test.js']
|
19 | },
|
20 |
|
21 |
|
22 | watch: {
|
23 | files: ['**/*.js'],
|
24 | tasks: ['default']
|
25 | },
|
26 |
|
27 |
|
28 | checkPages: {
|
29 | popular: {
|
30 | options: {
|
31 | pageUrls: grunt.file.readJSON('Gruntfile-pageUrls.json'),
|
32 | checkCaching: true,
|
33 | checkCompression: true,
|
34 | userAgent: 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36',
|
35 | summary: true
|
36 | }
|
37 | }
|
38 | }
|
39 | });
|
40 |
|
41 |
|
42 | grunt.loadNpmTasks('grunt-contrib-nodeunit');
|
43 | grunt.loadNpmTasks('grunt-contrib-watch');
|
44 | grunt.loadNpmTasks('grunt-eslint');
|
45 |
|
46 |
|
47 | grunt.loadTasks('./tasks');
|
48 |
|
49 |
|
50 | grunt.registerTask('default', ['nodeunit', 'eslint']);
|
51 | };
|