fis-auto-packager
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -26,7 +26,6 @@ var util = require("./../lib/util.js"); | ||
function remove_intersect(array1, array2){ | ||
for(var i=0; i<array1.length; i++){ | ||
var index = util.array_search(array1[i], array2) | ||
if(index){ | ||
var index = util.array_search(array1[i], array2); | ||
if(index !== false){ | ||
array2.splice(index, 1); | ||
@@ -33,0 +32,0 @@ } |
@@ -27,3 +27,3 @@ | ||
*/ | ||
function createPackConf(resources, sourceDir, outputDir, moduels, projectName){ | ||
function createPackConf(resources, sourceDir, outputDir, moduels, projectName, staticType){ | ||
var packResults = {}; | ||
@@ -65,2 +65,16 @@ | ||
} | ||
if(util.in_array("js", staticType)){ | ||
var packKey = "pkg/" + module + "_other_js.js"; | ||
packResult[packKey] = [ | ||
"/static/**.js", | ||
"/widget/**.js" | ||
]; | ||
} | ||
if(util.in_array("css", staticType)){ | ||
var packKey = "pkg/" + module + "_other_css.css"; | ||
packResult[packKey] = [ | ||
"/static/**.css", | ||
"/widget/**.css" | ||
]; | ||
} | ||
var packStr = JsonUtil.convertToString(packResult), | ||
@@ -121,3 +135,3 @@ fileName = module + "/fis-pack.json"; | ||
var predictPackageResultFile = packageReport.predictPackageResult(records, packageResults, outputDir, projectName); | ||
var resultFile = createPackConf(packageResults, sourceDir, outputDir, modules, projectName); | ||
var resultFile = createPackConf(packageResults, sourceDir, outputDir, modules, projectName, staticType); | ||
resultFiles = { | ||
@@ -124,0 +138,0 @@ "urlPv" : urlPvFile, |
{ | ||
"name": "fis-auto-packager", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "fis-auto-packager", | ||
@@ -5,0 +5,0 @@ "main": "fis-auto-packager.js", |
@@ -12,4 +12,4 @@ /** | ||
var RTT = 2, //round trip time 不能包含建立tcp链接的时间,因为http 1.1都是用了 keep-alive 没有tcp建立的开销 | ||
SPEED = 20, | ||
var RTT = 1, //round trip time 不能包含建立tcp链接的时间,因为http 1.1都是用了 keep-alive 没有tcp建立的开销 | ||
SPEED = 10, | ||
benefitMap = {}; | ||
@@ -16,0 +16,0 @@ |
219556
1920