Created
January 6, 2015 22:27
-
-
Save monolithed/129490160cb57e380291 to your computer and use it in GitHub Desktop.
grunt-fest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* tasks/fest | |
*/ | |
'use strict'; | |
var utils = require('util'); | |
module.exports = function (grunt, options) { | |
return { | |
index: { | |
options: { | |
template: function (data) { | |
var content = utils.format('return %s(%j);', data.contents, { | |
version: options.build.version, | |
banner : '<%= figlet.banner %>' | |
}); | |
return new Function(content)(); | |
} | |
}, | |
files: { | |
'build/index.html': 'cache/trunk/index.xml' | |
} | |
}, | |
client: { | |
options: { | |
template: function (data) { | |
return 'module.exports = ' + data.contents; | |
} | |
}, | |
files: { | |
'cache/trunk/templates/index.js': | |
'cache/trunk/templates/content/index.xml' | |
} | |
} | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment