Skip to content

Instantly share code, notes, and snippets.

@leeight
Created April 2, 2014 09:17
Show Gist options
  • Save leeight/9930702 to your computer and use it in GitHub Desktop.
Save leeight/9930702 to your computer and use it in GitHub Desktop.
diff --git a/edp-build-config.js b/edp-build-config.js
index f57b65c..2300771 100644
--- a/edp-build-config.js
+++ b/edp-build-config.js
@@ -13,41 +13,23 @@ var version = today.getFullYear() * 10000
exports.getProcessors = function () {
- return [
- new LessCompiler( {
- entryExtnames: pageEntries
- } ),
- new CssCompressor(),
- new ModuleCompiler( {
- configFile: 'module.conf',
- entryExtnames: moduleEntries
- } ),
- new JsCompressor(),
+ return [
+ new LessCompiler({
+ files: [
+ 'index.html',
+ 'dep/esui/*/src/css/main.less',
+ 'src/main.less'
+ ]
+ }),
+ // new CssCompressor(),
+ new ModuleCompiler(),
+ new TplMerge({
+ files: [
+ 'src/**/*.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'
- }
- ],
from: 'src',
to: 'asset' + '-' + version
} )
@@ -55,20 +37,20 @@ exports.getProcessors = function () {
};
exports.exclude = [
- '/tool',
- '/doc',
- '/test',
- '/mock',
- '/module.conf',
- '/dep/packages.manifest',
- '/dep/*/*/test',
- '/dep/*/*/doc',
- '/dep/*/*/demo',
- '/dep/*/*/tool',
- '/dep/*/*/*.md',
- '/dep/*/*/package.json',
- '/edp-*',
- '/.edpproj',
+ 'tool',
+ 'doc',
+ '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/module.conf b/module.conf
index 387ce76..39118ae 100644
--- a/module.conf
+++ b/module.conf
@@ -4,45 +4,45 @@
"packages": [
{
"name": "er",
- "location": "dep/er/3.0.3/src",
+ "location": "../dep/er/3.0.3/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": "etpl",
- "location": "dep/etpl/2.0.6/src",
+ "location": "../dep/etpl/2.0.6/src",
"main": "main"
},
{
"name": "esui",
- "location": "dep/esui/3.0.3/src",
+ "location": "../dep/esui/3.0.3/src",
"main": "main"
},
{
"name": "underscore",
- "location": "dep/underscore/1.4.4/src",
+ "location": "../dep/underscore/1.4.4/src",
"main": "underscore"
},
{
"name": "est",
- "location": "dep/est/1.1.0/src"
+ "location": "../dep/est/1.1.0/src"
},
{
"name": "esf-ms",
- "location": "dep/esf-ms/1.0.2/src"
+ "location": "../dep/esf-ms/1.0.2/src"
},
{
"name": "ef",
- "location": "dep/ef/3.0.2/src",
+ "location": "../dep/ef/3.0.2/src",
"main": "main"
},
{
"name": "moment",
- "location": "dep/moment/2.0.0/src",
+ "location": "../dep/moment/2.0.0/src",
"main": "moment"
}
],
@@ -57,4 +57,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/output/fe.tar.gz b/output/fe.tar.gz
deleted file mode 100644
index 92159d5..0000000
Binary files a/output/fe.tar.gz and /dev/null differ
diff --git a/src/common/require-tpl.js b/src/common/require-tpl.js
index 5a9c37c..e0f7c78 100644
--- a/src/common/require-tpl.js
+++ b/src/common/require-tpl.js
@@ -1,5 +1,5 @@
define( function ( require ) {
require('er/tpl!./main.tpl.html');
- require( 'er/tpl!biz/unit/info.tpl.html ');
+ require( 'er/tpl!biz/unit/info.tpl.html' );
return {};
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment