Skip to content

Instantly share code, notes, and snippets.

@leeight
Created May 6, 2014 07:46
Show Gist options
  • Save leeight/7033e6457f6ebcbb18e4 to your computer and use it in GitHub Desktop.
Save leeight/7033e6457f6ebcbb18e4 to your computer and use it in GitHub Desktop.
app/ecom/union/trunk/besc-static
diff --git a/edp-build-config.js b/edp-build-config.js
index d578422..439935f 100644
--- a/edp-build-config.js
+++ b/edp-build-config.js
@@ -77,9 +77,6 @@ exports.exclude = [
'*.sh'
];
-var moduleEntries = 'html,htm,phtml,tpl,vm,js';
-var pageEntries = 'html,htm,phtml,tpl,vm';
-
/**
* 获取构建processors的方法
*
@@ -99,8 +96,7 @@ exports.getProcessors = function () {
'src/common/css/main.less',
'src/common/css/reset.less',
'src/login/login.less'
- ],
- entryExtnames: pageEntries
+ ]
}),
new CssCompressor(),
new ModuleCompiler({
@@ -112,8 +108,6 @@ exports.getProcessors = function () {
'!src/external/json2.js',
'!src/login/*.js'
],
- configFile: 'module.conf',
- entryExtnames: moduleEntries,
getCombineConfig: getCombineConfig
}),
new JsCompressor(),
@@ -121,42 +115,34 @@ exports.getProcessors = function () {
new ReplaceDebug({
files: ['!*.tpl.html']
}),
- // new MD5Renamer( {
- // files: [
- // '*.jpg', '*.png', '*.gif',
+ new MD5Renamer( {
+ outputTemplate: '{basename}-{md5sum}{extname}',
+ files: [
+ '*.jpg', '*.png', '*.gif',
+
+ 'src/common/css/main.less',
+ 'src/startup/ui.js',
+ 'src/startup/echarts.js',
+ 'src/startup/biz.js',
+ 'src/startup/finance.js',
- // 'src/common/css/main.less',
- // 'src/startup/ui.js',
- // 'src/startup/echarts.js',
- // 'src/startup/biz.js',
- // 'src/startup/finance.js',
+ 'src/login/tangram.js',
+ 'src/login/login.js',
+ 'src/login/login.less',
- // 'src/login/tangram.js',
- // 'src/login/login.js',
- // 'src/login/login.less'
- // ],
- // replacements: {
- // html: [
- // "index.html"
- // ],
- // css: [
- // 'src/common/css/main.less',
- // 'src/login/login.less'
- // ]
- // }
- // }),
- 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 },
- { type: 'html', tag: 'a', attribute: 'href', extnames: pageEntries },
- { extnames: moduleEntries, replacer: 'module-config' },
- { extnames: 'css,less', replacer: 'css' }
+ 'index.html'
],
- from: 'src',
- to: 'asset'
+ replacements: {
+ html: [
+ 'index.html'
+ ],
+ css: [
+ 'src/common/css/main.less',
+ 'src/login/login.less'
+ ]
+ }
}),
+ new PathMapper(),
new OutputCleaner()
];
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment