-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
58 lines (52 loc) · 1.4 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
var prompt = require('prompt')
prompt.start()
var modPath = '../../server_mods/com.wondible.pa.mod_help_player_guide.server/'
var stream = 'stable'
var media = require('./lib/path').media(stream)
console.log(media)
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
copy: {
mod: {
files: [
{
src: [
'modinfo.json',
'LICENSE.txt',
'README.md',
'CHANGELOG.md',
'com.wondible.*/**',
'ui/**',
'pa/**'],
dest: modPath,
},
],
},
modinfo: {
files: [
{
src: ['modinfo.json'],
dest: modPath,
},
],
options: {
process: function(content, srcpath) {
var info = JSON.parse(content)
info.date = require('dateformat')(new Date(), 'yyyy/mm/dd')
info.identifier = info.identifier.replace('client', 'server')
info.context = 'server'
delete(info.priority)
console.log(info.identifier, info.version, info.date)
return JSON.stringify(info, null, 2)
}
}
},
},
clean: [modPath],
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
// Default task(s).
grunt.registerTask('default', ['copy']);
};