-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathGruntfile.js
34 lines (31 loc) · 881 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
const getDeployPath = (server, { user, branch } = {}) =>
`/Users/${user || process.env.USER}/Library/Application Support/Screeps/scripts/${server}/${branch || 'default'}/`;
const localServer = '127_0_0_1___21025';
const remoteServer = 'screeps.com';
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
deploy: {
local: {
expand: true,
flatten: true,
cwd: 'src/',
src: '**',
dest: getDeployPath(localServer),
filter: 'isFile',
},
server: {
expand: true,
flatten: true,
cwd: 'src/',
src: '**',
dest: getDeployPath(remoteServer),
filter: 'isFile',
},
},
});
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.renameTask('copy', 'deploy');
// Default task(s).
grunt.registerTask('default', ['deploy:local']);
};