/
Gruntfile.js
137 lines (133 loc) · 4.05 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
connect: {
test: {
port: 3000
}
},
jasmine: {
src: ['lib/**/*.js', 'coffee/**/*.coffee'],
options: {
specs: ['test/**/*Spec.js', 'test/**/*Spec.coffee'],
outfile: "specRunner.html"
}
},
watch: {
// tests: {
// files: ["<%= jasmine.src %>",
// "<%= jasmine.options.specs %>"],
// tasks: ["jasmine"]
// },
distjs: {
files: ['lib/**/*.js'],
tasks: ["concat:js"]
},
distcss: {
files: ['assets/css/**/*.css'],
tasks: ["concat:css"]
},
coffee: {
files: ['coffee/*.coffee', 'test/*.coffee'],
tasks: ['coffee']
},
sass: {
files: ['assets/scss/*.scss'],
tasks: ['sass']
},
karma: {
files: ['lib/**/*.js', 'test/**/*Spec.js',],
tasks: ['karma:unit:run']
},
nw: {
files: ['public/**/*'],
tasks: ['nodewebkit']
}
},
concat: {
js: {
src: [
'./bower_components/jQuery/dist/jquery.min.js',
'./bower_components/angular/angular.min.js',
'./bower_components/angular-mocks/angular-mocks.js',
'./bower_components/angular-sanitize/angular-sanitize.min.js',
'./bower_components/angular-ui-utils/keypress.min.js',
'./lib/**/*.js',
],
dest: './public/js/application.js'
},
css: {
src: [
'./assets/css/bootstrap.min.css',
'./assets/css/bootstrap-theme.min.css',
'./assets/css/slideShow.css'
],
dest: './public/css/application.css'
}
},
coffee: {
dist: {
options: {
bare: true
},
files: [{
expand: true,
flatten: true,
cwd: "coffee",
src: ["*.coffee"],
dest: "lib/",
ext: ".js"
}]
},
test: {
options: {
bare: false
},
files: [{
expand: true,
flatten: true,
cwd: "test",
src: ["./**/*.coffee"],
dest: "./test",
ext: ".js"
}]
}
},
sass: {
dist: {
files: [{
expand: true,
cwd: 'assets/scss',
src: ['*.scss'],
dest: 'assets/css',
ext: '.css'
}]
}
},
karma: {
unit: {
configFile: 'karma.conf.js',
background: true
}
},
nodewebkit: {
options: {
build_dir: './webkitbuilds',
mac: true,
win: true,
linux32: false,
linux64: true
},
src: ['./public/**/*']
},
});
grunt.loadNpmTasks("grunt-contrib-jasmine");
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-contrib-connect");
grunt.loadNpmTasks("grunt-contrib-coffee");
grunt.loadNpmTasks("grunt-contrib-sass");
grunt.loadNpmTasks("grunt-karma");
grunt.loadNpmTasks("grunt-node-webkit-builder");
grunt.registerTask("default", ["watch"]);
};