Comparing version 1.0.16 to 1.0.17
{ | ||
"name": "tpm", | ||
"version": "1.0.16", | ||
"version": "1.0.17", | ||
"description": "Static Package Manager", | ||
@@ -5,0 +5,0 @@ "author": "Longhao Luo <lhluo@tudou.com>", |
@@ -1,2 +0,1 @@ | ||
var Path = require('path'); | ||
@@ -36,3 +35,7 @@ var Fs = require('fs'); | ||
var relativePath = Path.relative(dirPath, path).split(Path.sep).join('/'); | ||
return Path.resolve(config.root + '/src/' + relativePath.replace(/\.css$/, '.less')); | ||
if (Path.extname(relativePath)) { | ||
return Path.resolve(config.root + '/src/' + relativePath.replace(/\.css$/, '.less')); | ||
} else { | ||
return ''; | ||
} | ||
} | ||
@@ -82,6 +85,9 @@ | ||
result[path] = value; | ||
console.log(value, pathCount) | ||
} | ||
pathCount--; | ||
if (pathCount === 0) { | ||
callback(result); | ||
setTimeout(function(){ | ||
callback(result); | ||
}, 0); | ||
} | ||
@@ -132,3 +138,3 @@ }); | ||
var path = url2path(url); | ||
if (data[path]) { | ||
if (path && data[path]) { | ||
var version = data[path]; | ||
@@ -135,0 +141,0 @@ return prefix + addVersion(url, version) + suffix; |
@@ -42,2 +42,3 @@ var Path = require('path'); | ||
var fileName = Path.basename(path); | ||
var relativePath = Path.relative(config.localRoot, path).split(Path.sep).join('/'); | ||
@@ -63,5 +64,7 @@ var options = { | ||
var remotePath = config.root + fileName; | ||
var remotePath = config.root + relativePath; | ||
var cmd = ['scp', fileName, config.user + '@' + config.host + ':' + remotePath].join(' '); | ||
Util.info('[SCP] ' + path + ' -> ' + remotePath); | ||
manage3.exec(cmd, function(err, stream){ | ||
@@ -118,2 +121,4 @@ if (err) { | ||
} | ||
config.server[env][project].localRoot = PROJECTS[project]; | ||
return config.server[env][project]; | ||
@@ -120,0 +125,0 @@ } |
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
1661790
38469