grunt-cacheinfo
Advanced tools
Comparing version 0.4.8 to 0.4.9
{ | ||
"name": "grunt-cacheinfo", | ||
"description": "cacheinfo.", | ||
"version": "0.4.8", | ||
"version": "0.4.9", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "bachi", |
@@ -23,2 +23,4 @@ # grunt-cacheinfo | ||
- 0.4.9 | ||
- 支持 `awpPathMap` 映射 | ||
- 0.4.8 | ||
@@ -25,0 +27,0 @@ - 支持 `market.m.taobao.com` 域名构建 |
@@ -237,2 +237,3 @@ /* | ||
var packageName = pkg.isAir ? pkg.name : pkg.name.replace(/^h5-/, ''); | ||
var awpPathMap = abc.awpPathMap || {}; | ||
@@ -245,2 +246,6 @@ all_files.forEach(function (file, k) { | ||
var key = generateFullUrl(pkg, file); | ||
var keyPath = key.replace(/^\/trip\//, ''); | ||
if (awpPathMap[keyPath]) { | ||
key = '/trip/' + awpPathMap[keyPath]; | ||
} | ||
cache_files[key] = file; | ||
@@ -310,9 +315,14 @@ if (packageName == 'flight-checkin') { | ||
var pathPrefix = '/' + abc.group + '/' + projectName + '/'; | ||
var key = pathPrefix + file; | ||
var keyPath = key.replace(/^\/trip\//, '').replace(/\/pages\//, '/'); | ||
if (awpPathMap[keyPath]) { | ||
key = '/trip/' + awpPathMap[keyPath]; | ||
} | ||
[ | ||
'/js' + pathPrefix + file.replace(/\.js$/, '-min.js'), | ||
'/js' + pathPrefix + file, | ||
'/js' + key.replace(/\.js$/, '-min.js'), | ||
'/js' + key, | ||
// awp 升级支持不需要必须部署在 `/js/` 前缀下 | ||
pathPrefix + file.replace(/\.js$/, '-min.js'), | ||
pathPrefix + file | ||
key.replace(/\.js$/, '-min.js'), | ||
key | ||
].forEach(function (reqPath) { | ||
@@ -319,0 +329,0 @@ abcJSON.cache[reqPath] = file; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19905
468
68