This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
87 lines (83 loc) · 2.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/**
* The grunt configuration file
*/
module.exports = function (grunt) {
"use strict";
// Project configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
ts: {
client: {
src: ['script/*.ts'],
out: 'script/output/script.js',
options: {
sourceMap: true,
target: 'es5',
noImplicitAny: true,
removeComments: false
}
},
nodeJS: {
src: ['*.ts', 'tools/*.ts', 'i18n/i18n.ts', 'data/dataManager.ts'],
options: {
module: 'commonjs',
target: 'es5',
noImplicitAny: true
}
}
},
less:{
default : {
files: {
"stylesheet/output/style.css": "stylesheet/style.less",
"stylesheet/output/style-ie.css": "stylesheet/style-ie.less"
}
}
},
jshint: {
node: {
src:['*.js', 'data/*.js', 'i18n/*.js', 'tools/*.js'],
options: {
node: true,
curly: true,
eqeqeq: true,
forin: true,
futurehostile: true,
latedef: true,
nonew:true,
unused:true
}
},
client: {
src: ['script/output/*.js'],
options: {
browser: true,
curly: true,
eqeqeq: true,
forin: true,
futurehostile: true,
latedef: true,
nonew:true,
unused:true
}
}
},
csslint: {
all: {
options: {
'ids': false,
'universal-selector': false,
'box-sizing': false
},
src: ['stylesheet/output/*.css']
}
}
});
grunt.loadNpmTasks('grunt-ts');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.registerTask('build', ['ts', 'less']);
grunt.registerTask('check', ['jshint', 'csslint']);
grunt.registerTask('default', ['build', 'check']);
};