-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
54 lines (42 loc) · 1002 Bytes
/
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
var grunt = require('grunt');
grunt.initConfig({
zip: {
'/tmp/learninggrunt.zip': ['**/*']
},
secret: grunt.file.readJSON('secret.json'),
sftp: {
test: {
files: {
"./": "*json"
},
options: {
path: '/tmp/',
host: '<%= secret.host %>',
username: '<%= secret.username %>',
password: '<%= secret.password %>',
showProgress: true
}
}
},
sshexec: {
test: {
command: 'uptime',
options: {
host: '<%= secret.host %>',
username: '<%= secret.username %>',
password: '<%= secret.password %>'
}
}
}
});
grunt.loadNpmTasks('grunt-ssh');
grunt.loadNpmTasks('grunt-zip');
grunt.registerTask('world', 'world task description', function(){
console.log('hello world');
});
grunt.registerTask('hello', 'say hello', function(name){
if(!name || !name.length)
grunt.warn('you need to provide a name.');
console.log('hello ' + name);
});
grunt.registerTask('default', ['world', 'hello:cactus']);