-
Notifications
You must be signed in to change notification settings - Fork 4
/
Gruntfile.js
53 lines (43 loc) · 1.08 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
'use strict';
module.exports = function (grunt) {
// Loads in any grunt tasks in the package.json file
require('load-grunt-tasks')(grunt);
var taskConfig = {
githooks: {
all: {
'pre-commit': 'test sassdoc',
}
},
clean: {
test: ['test/output']
},
libSass: {
options: {
includePaths: ['src/sass']
},
demo: {
files: [{
expand: true,
cwd: 'demo/styles',
src: ['*.scss'],
dest: 'demo/styles',
ext: '.css'
}]
}
},
rubySass: { // test with Ruby version of Sass
test: 'mkdir -p test/output/rubySass && sass test/tests.scss test/output/rubySass/test.css --sourcemap=none'
},
mochacli: { // uses LibSass
all: ['test/test_shim.js']
},
sassdoc: {
src: 'src/sass/'
}
};
grunt.renameTask('sass', 'libSass');
grunt.renameTask('exec', 'rubySass');
grunt.initConfig(taskConfig);
grunt.registerTask('test', ['githooks', 'clean:test', 'rubySass:test', 'mochacli']);
grunt.registerTask('default', ['test']);
};