fis-command-release
Advanced tools
Comparing version 0.8.12 to 0.8.13
@@ -82,2 +82,16 @@ /* | ||
var charset = file.charset; | ||
if(file.isText() && content.length){ | ||
if(dest.replace && dest.replace.from && dest.replace.to){ | ||
var reg = dest.replace.from; | ||
if(typeof reg === 'string'){ | ||
reg = new RegExp(fis.util.escapeReg(reg), 'g'); | ||
} else if(!(reg instanceof RegExp)){ | ||
fis.log.error('invalid deploy.replace.from [' + reg + ']'); | ||
} | ||
content = content.replace(reg, dest.replace.to); | ||
} | ||
if(charset !== 'utf8' && charset !== 'utf-8'){ | ||
content = fis.util.toEncoding(content, charset); | ||
} | ||
} | ||
if(file.isText() && content.length && charset !== 'utf8' && charset !== 'utf-8'){ | ||
@@ -84,0 +98,0 @@ content = fis.util.toEncoding(content, charset); |
{ | ||
"name" : "fis-command-release", | ||
"description" : "fis release command.", | ||
"version" : "0.8.12", | ||
"version" : "0.8.13", | ||
"author" : "FIS Team <fis@baidu.com>", | ||
@@ -6,0 +6,0 @@ "homepage" : "http://fis.baidu.com/", |
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
52843
1416