Skip to content

Instantly share code, notes, and snippets.

@Plou
Created November 18, 2015 11:51
Show Gist options
  • Save Plou/b4b8ce8ca47c7e1ae190 to your computer and use it in GitHub Desktop.
Save Plou/b4b8ce8ca47c7e1ae190 to your computer and use it in GitHub Desktop.
Compress grunt task configuration
name = require('optimist').argv.name
if name
name = '../export/' + name + '.zip'
else
now = new Date()
Y = now.getFullYear()
M = now.getMonth()+1
D = now.getDate()
H = now.getHours()
name = '../export/music-story-static-'+Y+'-'+M+'-'+D+'-'+H+'h.zip'
module.exports =
export:
options:
archive: name
files: [
{ src: ['../img/**']}
{ src: ['../js/*.js']}
{ src: ['../css/*.css']}
{ src: ['../fonts/*']}
{ src: ['../*.html']}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment