Skip to content

Instantly share code, notes, and snippets.

@aweigold
Created October 16, 2016 21:59
Show Gist options
  • Save aweigold/f5c18dfe47c720ac87ae419791571ddf to your computer and use it in GitHub Desktop.
Save aweigold/f5c18dfe47c720ac87ae419791571ddf to your computer and use it in GitHub Desktop.
Grunt processhtml errorpage targets example
// 'paths' is setup earlier in my grunt file
processhtml: {
mainapp: {
options: {
strip: true,
data: {
year: new Date().getFullYear(),
localCssPath: paths.minCssName,
localJsPath: paths.minJsName
}
},
files: {
'pathToBuildDir/apppath/index.html': ['app/index.html']
}
},
error400: {
options: {
strip: true,
data: {
year: new Date().getFullYear(),
localCssPath: paths.minCssName,
localJsPath: paths.minJsName
}
},
files: {
'pathToBuildDir/error/400.html': ['app/index.html']
}
},
error404: {
options: {
strip: true,
data: {
year: new Date().getFullYear(),
localCssPath: paths.minCssName,
localJsPath: paths.minJsName
}
},
files: {
'pathToBuildDir/error/400.html': ['app/index.html']
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment