From 4d287b274b075bde2bc5492e55f5baf96d54d86b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E7=9F=A5?= Date: Mon, 20 Oct 2014 12:33:24 +0800 Subject: [PATCH] fixes #694 --- build.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build.js b/build.js index 8c1adf718d..8c2364f2f7 100644 --- a/build.js +++ b/build.js @@ -15,10 +15,19 @@ function generateSeedJs() { seedDebugJsContent += fs.readFileSync(debugFilePath).toString(); seedJsContent += fs.readFileSync(miniFilePath).toString(); } + + seedDebugJsContent += getExtraContent(); + seedJsContent += getExtraContent(); + fs.writeFileSync(path.join(buildDir, 'seed-debug.js'), seedDebugJsContent + inferBaseCode); fs.writeFileSync(path.join(buildDir, 'seed.js'), seedJsContent + inferBaseCode); } +function getExtraContent(){ + var kgConfigContent = '\nif( location !== undefined ){ modulex.config({ packages : { kg : { base : "//g.alicdn.com/kg/" } } }) }'; + return kgConfigContent; +} + aggregateBower(bowerDir, buildDir); generateSeedJs();