-
Notifications
You must be signed in to change notification settings - Fork 0
/
GruntFile.js
76 lines (72 loc) · 2.53 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
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-typescript');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-msbuild');
grunt.loadNpmTasks('grunt-shell');
grunt.initConfig({
msbuild: {
src: ['CSharpWarrior.sln'],
options: {
projectConfiguration: 'Debug',
targets: ['Rebuild'],
verbosity: 'minimal'
}
},
shell: {
nunit: {
command: 'mono packages/NUnit.Runners.2.6.3/tools/nunit-console.exe "Test/CSharpWarrior.Server.Test/bin/Debug/CSharpWarrior.Domain.Test.dll" -noresult'
},
nuget: {
command: 'mono --runtime=v4.0 .nuget/nuget.exe restore'
},
npm: {
command: 'npm install'
}
},
// pkg: grunt.file.readJSON('package.json'),
typescript: {
base: {
src: ['Source/**/*.ts'],
options: {
module: 'amd',
target: 'es5',
sourceMap: true,
}
}
},
jasmine: {
all: {
src: [
'Source/CSharpWarrior.Web/Scripts/app/site.js',
'Source/CSharpWarrior.Web/Scripts/app/controllers/*.js',
],
options: {
'vendor': ['Source/CSharpWarrior.Web/Scripts/jquery-2.1.1.js',
'Source/CSharpWarrior.Web/Scripts/angular.js',
'Source/CSharpWarrior.Web/Scripts/angular-route.js',
'Source/CSharpWarrior.Web/Scripts/angular-mocks.js'],
'specs': 'Source/CSharpWarrior.Web/Scripts/tests/**/*.js'
}
}
},
watch: {
ts: {
files: ['Source/**/*.ts'],
tasks: ['typescript']
},
js: {
files: ['Source/CSharpWarrior.Web/Scripts/**/*.js'],
tasks: ['jasmine:all']
},
cs: {
files: ['Test/**/*.cs', 'Source/**/*.cs'],
tasks: ['msbuild', 'shell:nunit']
}
}
});
grunt.registerTask('default', ['watch']);
grunt.registerTask('unitTests', ['msbuild', 'shell:nunit']);
grunt.registerTask('startDev',
[ 'shell:npm', 'shell:nuget', 'msbuild', 'shell:nunit', 'typescript', 'jasmine', 'watch'])
}