Skip to content

Instantly share code, notes, and snippets.

@cbourdage
Created April 13, 2015 18:37
Show Gist options
  • Save cbourdage/aa256fcf1047ec49fae5 to your computer and use it in GitHub Desktop.
Save cbourdage/aa256fcf1047ec49fae5 to your computer and use it in GitHub Desktop.
sample grunt configuration for url replacement
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Build out replacements for error files
replace: {
build: {
options: {
patterns: [{
match: /\.\.\/fonts\//g,
replacement: function () {
return '/skin/frontend/enterprise/PlatinumPerformance/fonts/';
}
}, {
match: /\.\.\/images\/sprite/g,
replacement: function () {
return '/skin/frontend/enterprise/PlatinumPerformance/images/sprite';
}
}]
},
files: {
'errors/PlatinumPerformance/styles.css': 'errors/PlatinumPerformance/styles.css'
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment