-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
55 lines (49 loc) · 1.41 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
module.exports = function(grunt) {
grunt.initConfig({
server: {
script: 'app.js'
},
jshint: {
options: {
jshintrc: '.jshintrc'
},
source: [ 'client/**/*.js', 'server/**/*.js' ]
},
regarde: {
js: {
files: [ 'client/**/*.js', 'server/**/*.js' ],
tasks: [ 'express-server', 'livereload' ]
}
},
rsync: {
production: {
src: '.',
dest: '/nodeapps/verold-tanks/',
host: 'node@nodeapp.net',
recursive: true,
exclude: [ 'node_modules', '.git' ],
delete: true
}
},
sshexec: {
restart: {
command: 'sudo service verold-tanks restart',
options: {
host: 'nodeapp.net',
username: 'node',
privateKey: grunt.file.read(require('path').join(process.env.HOME, '.ssh', 'id_dsa'))
}
}
}
});
grunt.loadNpmTasks('grunt-regarde');
grunt.loadNpmTasks('grunt-contrib-livereload');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-express-server');
grunt.loadNpmTasks('grunt-rsync');
grunt.loadNpmTasks('grunt-ssh');
grunt.registerTask('default', [ 'jshint' ]);
grunt.registerTask('server', [ 'livereload-start', 'express-server', 'regarde' ]);
grunt.registerTask('watch', [ 'jshint', 'livereload-start', 'regarde' ]);
grunt.registerTask('deploy', [ 'rsync:production', 'sshexec:restart' ]);
};