-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
79 lines (63 loc) · 1.9 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
* grunt-scss-stylize
* https://github.com/chralden/grunt-scss-stylize
*
* Copyright (c) 2014 Chris Alden, contributors
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
stylizeSCSS: {
basic_order: {
files: [{src: ['tests/input/test.scss'], dest: 'tests/output/basic-order.scss', filter: 'isFile'}]
},
custom_order: {
options: {
order: ['background','opacity','float','font-size','padding','border-radius','position']
},
files: [{src: ['tests/input/test.scss'], dest: 'tests/output/custom-order.scss', filter: 'isFile'}]
},
spacing_options: {
options: {
tabSize: 2,
extraLine: false,
oneLine: false
},
files: [{src: ['tests/input/test.scss'], dest: 'tests/output/spacing-options.scss', filter: 'isFile'}]
},
numeric_options: {
options: {
cleanDecimals: true,
cleanZeros: true
},
files: [{src: ['tests/input/test.scss'], dest: 'tests/output/numeric-options.scss', filter: 'isFile'}]
},
alphabetical_order: {
options: {
alphabetizeProps: true
},
files: [{src: ['tests/input/test.scss'], dest: 'tests/output/alphabetical-order.scss', filter: 'isFile'}]
}
},
// Run JS Linter
jshint: {
options: {
jshintrc: 'jshintrc.json'
},
all: ['tasks/**/*.js']
},
// Unit tests.
nodeunit: {
tests: ['tests/*_test.js'],
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
// Actually load this plugin's task(s).
grunt.loadTasks('tasks');
grunt.registerTask('test', ['stylizeSCSS', 'nodeunit']);
grunt.registerTask('lint', ['jshint']);
grunt.registerTask('default', ['lint','test']);
};