You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.0 KiB
JavaScript
47 lines
1.0 KiB
JavaScript
module.exports = function(grunt) {
|
|
grunt.initConfig({
|
|
pkg: grunt.file.readJSON('package.json'),
|
|
sed: {
|
|
relativePaths: {
|
|
path: './build/index.html',
|
|
pattern: '="/',
|
|
replacement: '="./'
|
|
}
|
|
},
|
|
compress: {
|
|
main: {
|
|
createEmptyArchive: false,
|
|
options: {
|
|
archive: 'DrowningAmongStars_<%= pkg.version %>.zip'
|
|
},
|
|
files: [{
|
|
expand: true,
|
|
cwd: './build/',
|
|
src: [
|
|
'./index.html',
|
|
'./static/**'
|
|
],
|
|
dest: '/'
|
|
}]
|
|
}
|
|
},
|
|
run: {
|
|
publish: {
|
|
cmd: 'butler',
|
|
args: [
|
|
'push',
|
|
'DrowningAmongStars_<%= pkg.version %>.zip',
|
|
'tempest-dawn/drowning-among-stars:web'
|
|
]
|
|
}
|
|
}
|
|
})
|
|
|
|
grunt.loadNpmTasks('grunt-sed')
|
|
grunt.loadNpmTasks('grunt-contrib-compress')
|
|
grunt.loadNpmTasks('grunt-run')
|
|
|
|
grunt.registerTask('build', ['sed', 'compress'])
|
|
grunt.registerTask('publish', ['run:publish'])
|
|
}
|