1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | 'use strict';
|
10 |
|
11 | module.exports = function(grunt) {
|
12 |
|
13 | grunt.initConfig({
|
14 | jshint: {
|
15 | all: [
|
16 | 'Gruntfile.js',
|
17 | 'tasks/*.js',
|
18 | '<%= nodeunit.tests %>'
|
19 | ],
|
20 | options: {
|
21 | jshintrc: '.jshintrc'
|
22 | }
|
23 | },
|
24 |
|
25 |
|
26 | clean: {
|
27 | test: [
|
28 | 'tmp',
|
29 | '.sass-cache'
|
30 | ]
|
31 | },
|
32 |
|
33 |
|
34 | sass: {
|
35 | compile: {
|
36 | files: {
|
37 | 'tmp/scss.css': ['test/fixtures/compile.scss'],
|
38 | 'tmp/sass.css': ['test/fixtures/compile.sass'],
|
39 | 'tmp/css.css': ['test/fixtures/compile.css']
|
40 | }
|
41 | }
|
42 | },
|
43 |
|
44 |
|
45 | nodeunit: {
|
46 | tests: ['test/*_test.js']
|
47 | }
|
48 | });
|
49 |
|
50 |
|
51 | grunt.loadTasks('tasks');
|
52 |
|
53 |
|
54 | grunt.loadNpmTasks('grunt-contrib-clean');
|
55 | grunt.loadNpmTasks('grunt-contrib-jshint');
|
56 | grunt.loadNpmTasks('grunt-contrib-nodeunit');
|
57 | grunt.loadNpmTasks('grunt-contrib-internal');
|
58 |
|
59 | grunt.registerTask('mkdir', grunt.file.mkdir);
|
60 |
|
61 |
|
62 |
|
63 | grunt.registerTask('test', [
|
64 | 'clean',
|
65 | 'mkdir:tmp',
|
66 | 'sass',
|
67 | 'nodeunit',
|
68 | 'clean'
|
69 | ]);
|
70 |
|
71 |
|
72 | grunt.registerTask('default', ['jshint', 'test', 'build-contrib']);
|
73 | };
|