-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGruntFile.js
More file actions
76 lines (73 loc) · 2.57 KB
/
GruntFile.js
File metadata and controls
76 lines (73 loc) · 2.57 KB
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.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
dist: {
files: {
'production-client/js/assets.min.js': ['development-client/js/*.js', '!development-client/js/main.js'],
'production-client/js/main.min.js': ['development-client/js/main.js'],
'production-client/js/spec.min.js': ['development-client/test/*.js']
}
}
},
jshint: {
all: [
"Gruntfile.js",
"development-client/js/*.js",
"development-client/test/*.js"
],
options: {
jshintrc: ".jshintrc"
}
},
jasmine: {
src: "production-client/js/assets.min.js",
options: {
specs: "production-client/js/spec.min.js"
}
},
less: {
production: {
options: {
paths: ["development-client/css"],
cleancss: true
/*
, modifyVars: {
imgPath: '"http://memory-card-game.herokuapp.com/img"',
bgColor: '$000066'
}
*/
},
files: {
"production-client/css/style.css": "development-client/css/style.less"
}
}
},
bump: {
options: {
files: ['package.json'],
updateConfigs: [],
commit: true,
commitMessage: 'Release v%VERSION%',
commitFiles: ['package.json'],
createTag: true,
tagName: 'v%VERSION%',
tagMessage: 'Version %VERSION%',
push: true,
pushTo: 'https://github.com/MoonTahoe/Memory.git',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d'
}
}
});
grunt.loadNpmTasks('grunt-bump');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.registerTask('check', ['jshint']);
grunt.registerTask('compress', ['uglify', 'less']);
grunt.registerTask('test', ['jasmine']);
grunt.registerTask('travis', ['check', 'compress', 'test']);
grunt.registerTask('push', ['travis', 'bump']);
grunt.registerTask('default', 'travis');
};