Skip to content

Instantly share code, notes, and snippets.

@leeight
Last active August 29, 2015 13:58
Show Gist options
  • Save leeight/9927670 to your computer and use it in GitHub Desktop.
Save leeight/9927670 to your computer and use it in GitHub Desktop.
app/ecom/totem/trunk/totem/src/main/webapp
diff --git a/src/main/webapp/edp-build-config.js b/src/main/webapp/edp-build-config.js
index bd27823..133a287 100644
--- a/src/main/webapp/edp-build-config.js
+++ b/src/main/webapp/edp-build-config.js
@@ -3,60 +3,40 @@ exports.input = __dirname;
var path = require( 'path' );
exports.output = path.resolve( __dirname, 'output' );
-var moduleEntries = 'html,htm,phtml,tpl,vm,js';
-var pageEntries = 'html,htm,phtml,tpl,vm';
-
exports.getProcessors = function () {
return [
new LessCompiler( {
- exclude: [
- '*.less', '*.html', '*.js'
- ],
- include: [
- 'index.html',
+ files: [
'src/common/css/main.less'
],
- entryExtnames: pageEntries,
- compileOptions: {
- compress: true
- }
+ pageFiles: [
+ 'index.html'
+ ]
} ),
new ModuleCompiler( {
- exclude: ['src/common/js/jquery-*.min.js'],
- configFile: 'module.conf',
- entryExtnames: moduleEntries
+ files: [ 'src/common/main.js' ]
} ),
// 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: 'less,css', replacer: 'css' }
- ],
- from: 'src',
- to: 'asset'
- } )
+ new PathMapper()
];
};
exports.exclude = [
- '/tool',
- '/doc',
- '/coverage',
- '/test',
- '/mock',
- '/module.conf',
- '/dep/packages.manifest',
- '/dep/*/*/test',
- '/dep/*/*/doc',
- '/dep/*/*/demo',
- '/dep/*/*/tool',
- '/dep/*/*/*.md',
- '/dep/*/*/package.json',
- '/edp-*',
- '/.edpproj',
+ 'tool',
+ 'doc',
+ 'coverage',
+ 'test',
+ 'mock',
+ 'module.conf',
+ 'dep/packages.manifest',
+ 'dep/*/*/test',
+ 'dep/*/*/doc',
+ 'dep/*/*/demo',
+ 'dep/*/*/tool',
+ 'dep/*/*/*.md',
+ 'dep/*/*/package.json',
+ 'edp-*',
+ '.edpproj',
'.svn',
'.git',
'.gitignore',
diff --git a/src/main/webapp/module.conf b/src/main/webapp/module.conf
index bf36bc8..f6b6f9d 100644
--- a/src/main/webapp/module.conf
+++ b/src/main/webapp/module.conf
@@ -1,61 +1,61 @@
{
"baseUrl": "src",
"paths": {
- "tpl": "src/common/bat-ria/tpl",
- "bat-ria": "src/common/bat-ria",
- "u": "src/common/bat-ria/extension/underscore"
+ "tpl": "common/bat-ria/tpl",
+ "bat-ria": "common/bat-ria",
+ "u": "common/bat-ria/extension/underscore"
},
"packages": [
{
"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.8/src",
+ "location": "../dep/er/3.1.0-alpha.8/src",
"main": "main"
},
{
"name": "mini-event",
- "location": "dep/mini-event/1.0.0/src",
+ "location": "../dep/mini-event/1.0.0/src",
"main": "main"
},
{
"name": "esui",
- "location": "dep/esui/3.1.0-alpha.8/src",
+ "location": "../dep/esui/3.1.0-alpha.8/src",
"main": "main"
},
{
"name": "underscore",
- "location": "dep/underscore/1.5.2/src",
+ "location": "../dep/underscore/1.5.2/src",
"main": "underscore"
},
{
"name": "esf-ms",
- "location": "dep/esf-ms/1.0.2/src"
+ "location": "../dep/esf-ms/1.0.2/src"
},
{
"name": "est",
- "location": "dep/est/1.1.0/src"
+ "location": "../dep/est/1.1.0/src"
},
{
"name": "etpl",
- "location": "dep/etpl/2.0.10/src",
+ "location": "../dep/etpl/2.0.10/src",
"main": "main"
},
{
"name": "urijs",
- "location": "dep/urijs/1.12.0/src",
+ "location": "../dep/urijs/1.12.0/src",
"main": "URI"
},
{
"name": "moment",
- "location": "dep/moment/2.0.1/src",
+ "location": "../dep/moment/2.0.1/src",
"main": "moment"
}
],
"combine": {
"common/main": 1
}
-}
\ No newline at end of file
+}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment