forked from dogescript/grunt-dogescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
73 lines (64 loc) · 1.51 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
/*
* grunt-dogescript
* https://github.com/Bartvds/grunt-dogescript
*
* Copyright (c) 2013 Bart van der Schoor
* Licensed under the MIT license.
*/
'use strict';
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-continue');
grunt.loadTasks('tasks');
var path = require('path');
grunt.initConfig({
clean: {
test : ['./test/cases/**/*.js']
},
jshint: {
options:{
jshintrc: '.jshintrc'
},
all: [
'Gruntfile.js',
'lib/**/*.js'
]
},
dogescript: {
self: {
options: {
beauty: true
},
src: ['./task/doge.djs']
},
basic: {
options: {
beauty: true
},
src: ['./test/cases/basic/doge.djs']
},
bad: {
src: ['./test/cases/bad/doge.djs']
},
compiler: {
options: {
compiler: path.resolve('./node_modules/dogescript/index.js')
},
src: ['./test/cases/compiler/doge.djs']
},
bad_compiler: {
options: {
compiler: './node_modules/__non_existing__/index.js'
},
src: ['./test/cases/_compiler_/doge.djs']
}
}
});
grunt.registerTask('good_doge', ['dogescript:basic', 'dogescript:compiler']);
grunt.registerTask('bad_doge', ['dogescript:bad', 'dogescript:bad_compiler']);
grunt.registerTask('dev', ['dogescript:self']);
grunt.registerTask('default', ['test']);
grunt.registerTask('build', ['clean', 'jshint', 'good_doge', 'continueOn', 'bad_doge', 'continueOff']);
grunt.registerTask('test', ['build']);
};