Last active
August 29, 2015 13:58
-
-
Save leeight/9930403 to your computer and use it in GitHub Desktop.
app/ecom/columbus/trunk/cb-web-fe
This file contains hidden or 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
diff --git a/accounts.html b/accounts.html | |
index 477bdb4..f65e958 100644 | |
--- a/accounts.html | |
+++ b/accounts.html | |
@@ -64,11 +64,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/build.sh b/build.sh | |
old mode 100644 | |
new mode 100755 | |
diff --git a/demo/ui/CheckButton.html b/demo/ui/CheckButton.html | |
index 16d0536..29916f1 100644 | |
--- a/demo/ui/CheckButton.html | |
+++ b/demo/ui/CheckButton.html | |
@@ -54,11 +54,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/ColorPicker.html b/demo/ui/ColorPicker.html | |
index 717d2df..0514d52 100644 | |
--- a/demo/ui/ColorPicker.html | |
+++ b/demo/ui/ColorPicker.html | |
@@ -54,11 +54,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/CreativeThumbnail.html b/demo/ui/CreativeThumbnail.html | |
index 068c8df..628e1a7 100644 | |
--- a/demo/ui/CreativeThumbnail.html | |
+++ b/demo/ui/CreativeThumbnail.html | |
@@ -51,11 +51,11 @@ require.config({ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/DeliveryLine.html b/demo/ui/DeliveryLine.html | |
index 18901ce..5df124c 100644 | |
--- a/demo/ui/DeliveryLine.html | |
+++ b/demo/ui/DeliveryLine.html | |
@@ -53,11 +53,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/Ellipsis.html b/demo/ui/Ellipsis.html | |
index f1a0cf3..349eff3 100644 | |
--- a/demo/ui/Ellipsis.html | |
+++ b/demo/ui/Ellipsis.html | |
@@ -60,11 +60,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/Image.html b/demo/ui/Image.html | |
index 8f27f92..fe22413 100644 | |
--- a/demo/ui/Image.html | |
+++ b/demo/ui/Image.html | |
@@ -59,11 +59,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/LineChart.html b/demo/ui/LineChart.html | |
index 9326863..98259e2 100644 | |
--- a/demo/ui/LineChart.html | |
+++ b/demo/ui/LineChart.html | |
@@ -72,11 +72,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/LinkTree.html b/demo/ui/LinkTree.html | |
index b5b7a8b..89c21dc 100644 | |
--- a/demo/ui/LinkTree.html | |
+++ b/demo/ui/LinkTree.html | |
@@ -52,11 +52,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/Orient.html b/demo/ui/Orient.html | |
index 9870634..747a647 100644 | |
--- a/demo/ui/Orient.html | |
+++ b/demo/ui/Orient.html | |
@@ -52,11 +52,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/Palette.html b/demo/ui/Palette.html | |
index 45fe8b8..bab9143 100644 | |
--- a/demo/ui/Palette.html | |
+++ b/demo/ui/Palette.html | |
@@ -54,11 +54,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/PaletteDialog.html b/demo/ui/PaletteDialog.html | |
index f90f1d7..4318b50 100644 | |
--- a/demo/ui/PaletteDialog.html | |
+++ b/demo/ui/PaletteDialog.html | |
@@ -56,11 +56,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/RichSelector.html b/demo/ui/RichSelector.html | |
index 8233e08..5749604 100644 | |
--- a/demo/ui/RichSelector.html | |
+++ b/demo/ui/RichSelector.html | |
@@ -118,11 +118,11 @@ require.config({ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/ScheduleTable.html b/demo/ui/ScheduleTable.html | |
index ca6bdd3..161f66a 100644 | |
--- a/demo/ui/ScheduleTable.html | |
+++ b/demo/ui/ScheduleTable.html | |
@@ -76,11 +76,11 @@ require.config({ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/SearchBox.html b/demo/ui/SearchBox.html | |
index d3d6804..3502e2f 100644 | |
--- a/demo/ui/SearchBox.html | |
+++ b/demo/ui/SearchBox.html | |
@@ -53,11 +53,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/Sidebar.html b/demo/ui/Sidebar.html | |
index ba9477d..65127bf 100644 | |
--- a/demo/ui/Sidebar.html | |
+++ b/demo/ui/Sidebar.html | |
@@ -72,11 +72,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/TableSelector.html b/demo/ui/TableSelector.html | |
index 2f51835..04c06ad 100644 | |
--- a/demo/ui/TableSelector.html | |
+++ b/demo/ui/TableSelector.html | |
@@ -89,11 +89,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/TextStyle.html b/demo/ui/TextStyle.html | |
index 7f82f03..e224692 100644 | |
--- a/demo/ui/TextStyle.html | |
+++ b/demo/ui/TextStyle.html | |
@@ -68,11 +68,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/Toast.html b/demo/ui/Toast.html | |
index 3a6979e..8b3726f 100644 | |
--- a/demo/ui/Toast.html | |
+++ b/demo/ui/Toast.html | |
@@ -51,11 +51,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/ToggleButton.html b/demo/ui/ToggleButton.html | |
index cf43e4c..3001b41 100644 | |
--- a/demo/ui/ToggleButton.html | |
+++ b/demo/ui/ToggleButton.html | |
@@ -53,11 +53,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/TogglePanel.html b/demo/ui/TogglePanel.html | |
index 886fde7..ac947f2 100644 | |
--- a/demo/ui/TogglePanel.html | |
+++ b/demo/ui/TogglePanel.html | |
@@ -68,11 +68,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/ToggleSelector.html b/demo/ui/ToggleSelector.html | |
index b1fa4ec..7d5b128 100644 | |
--- a/demo/ui/ToggleSelector.html | |
+++ b/demo/ui/ToggleSelector.html | |
@@ -77,11 +77,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/ToolBox.html b/demo/ui/ToolBox.html | |
index 8c3f5a4..31a0a93 100644 | |
--- a/demo/ui/ToolBox.html | |
+++ b/demo/ui/ToolBox.html | |
@@ -52,11 +52,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/TreeSelector.html b/demo/ui/TreeSelector.html | |
index 910f19e..3b53a78 100644 | |
--- a/demo/ui/TreeSelector.html | |
+++ b/demo/ui/TreeSelector.html | |
@@ -87,11 +87,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/demo/ui/Uploader.html b/demo/ui/Uploader.html | |
index bd3e2d0..ded707f 100644 | |
--- a/demo/ui/Uploader.html | |
+++ b/demo/ui/Uploader.html | |
@@ -55,11 +55,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/edp-build-config.js b/edp-build-config.js | |
index 2735242..e9d6ce8 100644 | |
--- a/edp-build-config.js | |
+++ b/edp-build-config.js | |
@@ -4,10 +4,6 @@ | |
*/ | |
var AddViewName = require('./tool/build/AddViewName'); | |
-var package = require('./tool/util').getModulesFromPackage; | |
-var namespace = require('./tool/util').getModulesFromNamespace; | |
-var getBizNamespaces = require('./tool/util').getBizNamespaces; | |
- | |
var cwd = process.cwd(); | |
var path = require('path'); | |
@@ -22,7 +18,7 @@ var args = {}; | |
args[key] = value; | |
} | |
}()); | |
-var svnRevision = args.revision || ''; | |
+var svnRevision = args.revision || '8964'; | |
/** | |
* 输入目录 | |
@@ -39,34 +35,43 @@ exports.input = cwd; | |
exports.output = path.resolve(cwd, args.output || 'output'); | |
/** | |
+ * 声明特定文件的编码 | |
+ * @type {Object} | |
+ */ | |
+exports.fileEncodings = { | |
+ 'src/common/img/channel-example-csv.csv': 'gbk', | |
+ 'src/common/img/slot-example-csv.csv': 'gbk' | |
+}; | |
+ | |
+/** | |
* 排除文件pattern列表 | |
* | |
* @type {Array} | |
*/ | |
exports.exclude = [ | |
- '/src/static/tpl/*', | |
- '/tool', | |
- '/doc', | |
- '/test', | |
- '/mockup', | |
- '/demo', | |
- '/copyright.txt', | |
+ 'src/static/tpl/*', | |
+ 'tool', | |
+ 'doc', | |
+ 'test', | |
+ 'mockup', | |
+ 'demo', | |
+ 'copyright.txt', | |
// '/index-debug.html', | |
- '/index-qa.html', | |
- '/module.conf', | |
- '/dep/packages.manifest', | |
- '/dep/*/*/test', | |
- '/dep/*/*/doc', | |
- '/dep/*/*/demo', | |
- '/dep/*/*/example', | |
- '/dep/*/*/tool', | |
- '/dep/*/*/jsduck', | |
- '/dep/*/*/*.md', | |
- '/dep/*/*/package.json', | |
- '/dep/echarts/*/src/util/mapData/rawData/china/*.js', | |
- '/dep/echarts/*/src/util/mapData/rawData/*.js', | |
- '/edp-*', | |
- '/.edpproj', | |
+ 'index-qa.html', | |
+ 'module.conf', | |
+ 'dep/packages.manifest', | |
+ 'dep/*/*/test', | |
+ 'dep/*/*/doc', | |
+ 'dep/*/*/demo', | |
+ 'dep/*/*/example', | |
+ 'dep/*/*/tool', | |
+ 'dep/*/*/jsduck', | |
+ 'dep/*/*/*.md', | |
+ 'dep/*/*/package.json', | |
+ 'dep/echarts/*/src/util/mapData/rawData/china/*.js', | |
+ 'dep/echarts/*/src/util/mapData/rawData/*.js', | |
+ 'edp-*', | |
+ '.edpproj', | |
'.svn', | |
'.git', | |
'.gitignore', | |
@@ -93,126 +98,51 @@ exports.getProcessors = function () { | |
return [ | |
new AddViewName(), | |
new LessCompiler({ | |
- exclude: [ | |
- 'src/ui/css/*.less', | |
- 'src/common/css/*.less', | |
- 'src/*/css/*.less', | |
- 'src/*/*/css/*.less', | |
- 'src/*/ui/css/*.less', | |
- 'src/*/*/ui/css/*.less' | |
- ], | |
- include: [ | |
+ files: [ | |
+ 'dep/esui/*/src/css/main.less', | |
'src/common/css/extern.less', | |
'src/common/css/main.less', | |
'src/common/css/reset.less', | |
'src/static/css/index.less' | |
- ], | |
- entryExtnames: pageEntries | |
+ ] | |
}), | |
- new CssCompressor(), | |
+ // new CssCompressor(), | |
new ModuleCompiler({ | |
- exclude: [ | |
- 'dep/etpl/*/src/main.js', | |
- 'dep/jquery/*/src/jquery.js', | |
- 'dep/jquery/*/src/jquery.min.js', | |
- 'src/external/esl.js', | |
- 'src/external/h.js', | |
- 'src/external/json2.js', | |
- 'src/static/footer.js', | |
- 'src/static/header.js' | |
+ files: [ | |
+ '*.js', | |
+ '!dep/etpl/*/src/main.js', | |
+ '!dep/jquery/*/src/jquery.js', | |
+ '!dep/jquery/*/src/jquery.min.js', | |
+ '!src/external/esl.js', | |
+ '!src/external/h.js', | |
+ '!src/external/json2.js', | |
+ '!src/static/footer.js', | |
+ '!src/static/header.js' | |
], | |
- getCombineConfig: function () { | |
- var bizNamespaces = getBizNamespaces(); | |
- | |
- var bizUIModules = []; | |
- bizNamespaces | |
- .map(function (namespace) { return namespace + '/ui'; }) | |
- .forEach(function (bizNamespace) { bizUIModules.push.apply(bizUIModules, namespace(bizNamespace)); }); | |
- | |
- // 3个启动脚本 | |
- var config = { | |
- 'startup/ui': { | |
- include: ['moment/lang/zh-cn'].concat(package('esui')), | |
- exclude: [ | |
- 'esui/Sidebar' // `Sidebar`用自己的 | |
- ] | |
- }, | |
- 'startup/ria': { | |
- include: ['echarts', 'echarts/chart/line', 'echarts/chart/bar'] | |
- .concat(package('er', 'ef', 'ub-ria', 'er-track', 'etpl', 'saber-cookie')) | |
- .concat('common/extension') | |
- .concat(namespace('common/extension')), | |
- exclude: package('mini-event', 'moment', 'underscore', 'esui') | |
- }, | |
- 'startup/biz': { | |
- include: ['report/delivery/Dashboard', 'report/slot/Dashboard', 'report/order/Dashboard'] | |
- .concat(namespace('common', 'ui', 'error', 'bulletin')) | |
- .concat(namespace('dashboard', 'slot', 'order', 'delivery')) | |
- .concat(bizUIModules), | |
- exclude: package( | |
- 'mini-event', 'moment', 'underscore', 'saber-cookie', | |
- 'etpl', 'er', 'er-track', 'ef', 'echarts', 'esui', 'ub-ria' | |
- ) | |
- } | |
- }; | |
- | |
- var baseModules = namespace('common', 'ui') | |
- .concat(package('er', 'ef', 'ub-ria', 'er-track', 'etpl', 'saber-cookie')) | |
- .concat(package('esui', 'echarts', 'zrender', 'mini-event', 'underscore', 'moment')); | |
- | |
- bizNamespaces.forEach(function (bizNamespace) { | |
- var exclude = baseModules.concat(bizNamespace + '/ui'); | |
- // 通用 | |
- config[bizNamespace + '/List'] = { exclude: exclude }; | |
- config[bizNamespace + '/Form'] = { exclude: exclude }; | |
- config[bizNamespace + '/Detail'] = { exclude: exclude }; | |
- config[bizNamespace + '/Read'] = { exclude: exclude }; | |
- // 报表 | |
- config[bizNamespace + '/Date'] = { exclude: exclude }; | |
- config[bizNamespace + '/General'] = { exclude: exclude }; | |
- config[bizNamespace + '/Hour'] = { exclude: exclude }; | |
- }); | |
- | |
- return config; | |
- }, | |
- configFile: 'module.conf', | |
- entryExtnames: moduleEntries | |
+ getCombineConfig: require( './tool/get-combine-config' ) | |
}), | |
new TplMerge({ | |
- exclude: [ | |
- 'src/external/*', | |
- 'src/static/*' | |
+ files: [ | |
+ 'src/**/*.js', | |
+ '!src/external/*', | |
+ '!src/static/*' | |
] | |
}), | |
// 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 }, | |
- { type: 'html', tag: 'a', attribute: 'href', extnames: pageEntries }, | |
- { extnames: moduleEntries, replacer: 'module-config' }, | |
- { extnames: 'css,less', replacer: 'css' } | |
- ], | |
- from: 'src', | |
- to: 'asset-' + svnRevision | |
- }), | |
- 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' } | |
- ], | |
- from: 'dep', | |
- to: 'dep-' + svnRevision | |
+ mapper: function( value ){ | |
+ value = value.replace( /(^|\/)src(\/|$)/, | |
+ '$1' + 'asset-' + svnRevision + '$2' ); | |
+ value = value.replace( /(^|\/)dep(\/|$)/, | |
+ '$1' + 'dep-' + svnRevision + '$2' ); | |
+ return value; | |
+ } | |
}), | |
new AddCopyright(), | |
new ReplaceDebug({ | |
- exclude: ['*.tpl.html'] | |
- }) | |
+ files: [ '*.tpl.html' ] | |
+ }), | |
+ new OutputCleaner() | |
]; | |
}; | |
diff --git a/find-password.html b/find-password.html | |
index dc82396..c3224df 100644 | |
--- a/find-password.html | |
+++ b/find-password.html | |
@@ -45,11 +45,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/index-debug.html b/index-debug.html | |
index 26c0570..e664227 100644 | |
--- a/index-debug.html | |
+++ b/index-debug.html | |
@@ -74,11 +74,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/index-qa.html b/index-qa.html | |
index d0aa9a6..17d927d 100644 | |
--- a/index-qa.html | |
+++ b/index-qa.html | |
@@ -74,11 +74,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/index.html b/index.html | |
index 7c70248..efb2878 100644 | |
--- a/index.html | |
+++ b/index.html | |
@@ -34,11 +34,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/main.html b/main.html | |
index 09ed07b..769a97f 100644 | |
--- a/main.html | |
+++ b/main.html | |
@@ -79,11 +79,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/message.html b/message.html | |
index a3474bd..a2eb233 100644 | |
--- a/message.html | |
+++ b/message.html | |
@@ -43,11 +43,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/module.conf b/module.conf | |
index c610b32..134d4ec 100644 | |
--- a/module.conf | |
+++ b/module.conf | |
@@ -1,89 +1,78 @@ | |
{ | |
"baseUrl": "src", | |
"paths": { | |
- "tpl": "src/common/tpl", | |
- "js": "src/external/js" | |
+ "tpl": "common/tpl", | |
+ "js": "external/js" | |
}, | |
"packages": [ | |
{ | |
"name": "underscore", | |
- "location": "dep/underscore/1.5.2/src", | |
+ "location": "../dep/underscore/1.5.2/src", | |
"main": "underscore" | |
}, | |
{ | |
"name": "ef", | |
- "location": "dep/ef/3.1.0-alpha.3/src", | |
+ "location": "../dep/ef/3.1.0-alpha.3/src", | |
"main": "main" | |
}, | |
{ | |
"name": "er", | |
- "location": "dep/er/3.1.0-alpha.6/src", | |
+ "location": "../dep/er/3.1.0-alpha.6/src", | |
"main": "main" | |
}, | |
{ | |
"name": "esui", | |
- "location": "dep/esui/3.1.0-alpha.6/src", | |
+ "location": "../dep/esui/3.1.0-alpha.6/src", | |
"main": "main" | |
}, | |
{ | |
"name": "echarts", | |
- "location": "dep/echarts/1.3.6/src", | |
+ "location": "../dep/echarts/1.3.6/src", | |
"main": "echarts" | |
}, | |
{ | |
"name": "zrender", | |
- "location": "dep/zrender/1.0.8/src", | |
+ "location": "../dep/zrender/1.0.8/src", | |
"main": "zrender" | |
}, | |
{ | |
"name": "jquery", | |
- "location": "dep/jquery/1.9.1/src", | |
- "main": "jquery.min.js" | |
+ "location": "../dep/jquery/1.9.1/src", | |
+ "main": "jquery.min" | |
}, | |
{ | |
"name": "moment", | |
- "location": "dep/moment/2.0.0/src", | |
+ "location": "../dep/moment/2.0.1/src", | |
"main": "moment" | |
}, | |
{ | |
"name": "saber-cookie", | |
- "location": "dep/saber-cookie/0.1.0/src", | |
+ "location": "../dep/saber-cookie/0.1.0/src", | |
"main": "cookie" | |
}, | |
{ | |
"name": "mini-event", | |
- "location": "dep/mini-event/1.0.0/src", | |
+ "location": "../dep/mini-event/1.0.0/src", | |
"main": "main" | |
}, | |
{ | |
"name": "er-track", | |
- "location": "dep/er-track/0.9.1/src", | |
+ "location": "../dep/er-track/0.9.1/src", | |
"main": "main" | |
}, | |
{ | |
"name": "etpl", | |
- "location": "dep/etpl/2.0.10/src", | |
+ "location": "../dep/etpl/2.0.10/src", | |
"main": "main" | |
}, | |
{ | |
"name": "est", | |
- "location": "dep/est/1.1.0/src" | |
+ "location": "../dep/est/1.1.0/src" | |
}, | |
{ | |
"name": "ub-ria", | |
- "location": "dep/ub-ria/0.8.0-alpha.4/src", | |
+ "location": "../dep/ub-ria/0.8.0-alpha.4/src", | |
"main": "main" | |
- }, | |
- { | |
- "name": "test", | |
- "location": "../test" | |
- } | |
- ], | |
- "combine": { | |
- "startup/er": { | |
- "include": [ | |
- "er/**" | |
- ] | |
} | |
- } | |
+ ] | |
} | |
\ No newline at end of file | |
diff --git a/register.html b/register.html | |
index d764e58..0c5f121 100644 | |
--- a/register.html | |
+++ b/register.html | |
@@ -45,11 +45,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/reset-password.html b/reset-password.html | |
index 7094b59..c5f8f52 100644 | |
--- a/reset-password.html | |
+++ b/reset-password.html | |
@@ -45,11 +45,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/src/static/tpl/index.html b/src/static/tpl/index.html | |
index 0ab4451..149b3a7 100644 | |
--- a/src/static/tpl/index.html | |
+++ b/src/static/tpl/index.html | |
@@ -34,11 +34,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/test/run.htm b/test/run.htm | |
index 0933372..51c74df 100644 | |
--- a/test/run.htm | |
+++ b/test/run.htm | |
@@ -50,11 +50,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ | |
diff --git a/tool/get-combine-config.js b/tool/get-combine-config.js | |
new file mode 100644 | |
index 0000000..de288a9 | |
--- /dev/null | |
+++ b/tool/get-combine-config.js | |
@@ -0,0 +1,136 @@ | |
+/*************************************************************************** | |
+ * | |
+ * Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | |
+ * $Id$ | |
+ * | |
+ **************************************************************************/ | |
+ | |
+ | |
+ | |
+/** | |
+ * tool/get-combine-config.js ~ 2014/04/02 15:25:02 | |
+ * @author leeight([email protected]) | |
+ * @version $Revision$ | |
+ * @description | |
+ * | |
+ **/ | |
+var package = require('./util').getModulesFromPackage; | |
+var namespace = require('./util').getModulesFromNamespace; | |
+var getBizNamespaces = require('./util').getBizNamespaces; | |
+ | |
+function negative( array ){ | |
+ return array.map(function(item){ | |
+ return '!' + item; | |
+ }); | |
+} | |
+ | |
+function expand( array ) { | |
+ var rv = []; | |
+ array.forEach(function(item){ | |
+ rv.push( item ); | |
+ rv.push( item + '/**' ); | |
+ }); | |
+ return rv; | |
+} | |
+ | |
+function GenerateModuleCombineConfig() { | |
+ var bizNamespaces = getBizNamespaces(); | |
+ var bizUIModules = bizNamespaces.map(function(item) { | |
+ return item + '/ui/**'; | |
+ }); | |
+ | |
+ var dependencies = [ | |
+ 'er', 'ef', 'ub-ria', 'er-track', 'etpl', 'saber-cookie', | |
+ 'esui', 'echarts', 'zrender', 'mini-event', 'underscore', 'moment' | |
+ ]; | |
+ | |
+ // 3个启动脚本 | |
+ var config = { | |
+ 'startup/ui': { | |
+ files: [ | |
+ 'moment/lang/zh-cn', | |
+ 'esui', 'esui/**', | |
+ | |
+ '!esui/Sidebar' | |
+ ] | |
+ }, | |
+ 'startup/ria': { | |
+ files: [ | |
+ 'echarts', 'echarts/chart/line', 'echarts/chart/bar', | |
+ 'er', 'er/**', | |
+ 'ef', 'ef/**', | |
+ 'ub-ria', 'ub-ria/**', | |
+ 'er-track', 'er-track/**', | |
+ 'etpl', 'etpl/**', | |
+ 'saber-cookie', 'saber-cookie/**', | |
+ 'common/extension', 'common/extension/**', | |
+ | |
+ '!mini-event', '!mini-event/**', | |
+ '!moment', '!moment/**', | |
+ '!underscore', '!underscore/**', | |
+ '!esui', '!esui/**' | |
+ ] | |
+ }, | |
+ 'startup/biz': { | |
+ files: [ | |
+ 'report/delivery/Dashboard', 'report/slot/Dashboard', 'report/order/Dashboard', | |
+ 'common/**', 'ui/**', 'error/**', 'bulletin/**', | |
+ 'dashboard/**', 'slot/**', 'order/**', 'delivery/**', | |
+ bizUIModules, | |
+ | |
+ negative( expand( dependencies ) ) | |
+ ] | |
+ } | |
+ }; | |
+ | |
+ var baseExcludes = [ | |
+ negative( expand( [ 'common', 'ui' ] ) ), | |
+ negative( expand( dependencies ) ), | |
+ '!tpl' | |
+ ]; | |
+ | |
+ bizNamespaces.forEach(function (bizNamespace) { | |
+ var exclude = [ baseExcludes, '!' + bizNamespace + '/ui/**' ]; | |
+ // 通用 | |
+ config[bizNamespace + '/List'] = { files: exclude }; | |
+ config[bizNamespace + '/Form'] = { files: exclude }; | |
+ config[bizNamespace + '/Detail'] = { files: exclude }; | |
+ config[bizNamespace + '/Read'] = { files: exclude }; | |
+ // 报表 | |
+ config[bizNamespace + '/Date'] = { files: exclude }; | |
+ config[bizNamespace + '/General'] = { files: exclude }; | |
+ config[bizNamespace + '/Hour'] = { files: exclude }; | |
+ }); | |
+ | |
+ return config; | |
+} | |
+ | |
+module.exports = GenerateModuleCombineConfig; | |
+ | |
+if ( require.main === module ) { | |
+ // console.log( getBizNamespaces() ); | |
+ // console.log( namespace( 'common' ) ); | |
+ console.log( JSON.stringify( GenerateModuleCombineConfig(), null, 2 ) ); | |
+} | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+/* vim: set ts=4 sw=4 sts=4 tw=100: */ | |
diff --git a/verify.html b/verify.html | |
index 87c5d72..52356d3 100644 | |
--- a/verify.html | |
+++ b/verify.html | |
@@ -45,11 +45,11 @@ | |
{ | |
'name': 'jquery', | |
'location': '../dep/jquery/1.9.1/src', | |
- 'main': 'jquery.min.js' | |
+ 'main': 'jquery.min' | |
}, | |
{ | |
'name': 'moment', | |
- 'location': '../dep/moment/2.0.0/src', | |
+ 'location': '../dep/moment/2.0.1/src', | |
'main': 'moment' | |
}, | |
{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment