Skip to content

Instantly share code, notes, and snippets.

@leeight
Created February 13, 2014 03:16
Show Gist options
  • Save leeight/8969121 to your computer and use it in GitHub Desktop.
Save leeight/8969121 to your computer and use it in GitHub Desktop.
diff --git a/edp-build-config.js b/edp-build-config.js
index 54f6224..350d877 100644
--- a/edp-build-config.js
+++ b/edp-build-config.js
@@ -12,7 +12,19 @@ exports.getProcessors = function () {
new CssCompressor(),
- new JsCompressor()
+ new JsCompressor(),
+
+ new PathMapper( {
+ replacements: [
+ { type: 'html', tag: 'link', attribute: 'href', extnames: pageEntries },
+ { type: 'html', tag: 'img', attribute: 'src', extnames: pageEntries },
+ { type: 'html', tag: 'script', attribute: 'src', extnames: pageEntries },
+ { extnames: moduleEntries, replacer: 'module-config' },
+ { extnames: 'css,less', replacer: 'css' }
+ ],
+ from: 'src',
+ to: 'asset'
+ } )
];
};
diff --git a/output/index/main.css b/output/index/main.css
index d09338b..613c946 100644
--- a/output/index/main.css
+++ b/output/index/main.css
@@ -1 +1 @@
-.test1,.test2{background:url(../common/../common/./img/logo.png)}
\ No newline at end of file
+.test1,.test2{background:url(../common/img/logo.png)}
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment