-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathGruntfile.js
49 lines (48 loc) · 1.51 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
var pkg = require('./package.json');
module.exports = function(grunt) {
grunt.initConfig({
pkg: '<json:package.json>',
config: {
baseurl: 'http://rtsys.informatik.uni-kiel.de/~kieler/files/',
folder: 'nightly/klayjs/',
file: 'klay_layered_js_plainjslinker_nightly_latest.zip'
},
curl: {
'get-klayjs': {
src: '<%= config.baseurl %><%= config.folder %><%= config.file %>',
dest: '<%= config.file %>'
}
},
unzip: {
'klay': '<%= config.file %>'
},
rename: {
options: {
ignore: true
},
moveThis: {
src: 'klay/klay.js',
dest: 'klay.js'
}
},
file_append: {
default_options: {
files: [{
prepend: '/** klay.js version ' + pkg.version + ' build <%= grunt.template.today("yyyymmddhhmm") %> */\n',
input: 'klay.js',
output: 'klay.js'
}]
}
},
clean: {
klay_package: '<%= config.file %>',
temp_dir: 'klay'
}
});
grunt.loadNpmTasks('grunt-curl');
grunt.loadNpmTasks('grunt-zip');
grunt.loadNpmTasks('grunt-rename');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-file-append');
grunt.registerTask('default', ['curl', 'unzip', 'rename', 'file_append', 'clean']);
};