grunt-sync
Advanced tools
Comparing version 0.5.1 to 0.5.2
{ | ||
"name": "grunt-sync", | ||
"description": "Task to synchronize two directories. Similar to grunt-copy but updates only files that have been changed.", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"homepage": "https://github.com/tomusdrw/grunt-sync.git", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -42,3 +42,3 @@ var fs = require('promised-io/fs'); | ||
if (isExpanded || isCompactForm) { | ||
dest = fileDef.dest; | ||
dest = convertPathsToSystemSpecific(fileDef.dest); | ||
} else { | ||
@@ -296,10 +296,19 @@ dest = path.join(fileDef.dest, src); | ||
function convertPathToSystemSpecific (pathToConvert) { | ||
var newPath = path.join.apply(path, pathToConvert.split('/')); | ||
var startsWithSlash = pathToConvert[0] === '/'; | ||
if (startsWithSlash) { | ||
return '/' + newPath; | ||
} | ||
return newPath; | ||
} | ||
function convertPathsToSystemSpecific (paths) { | ||
if (!paths.map) { | ||
return convertPathToSystemSpecific (paths); | ||
} | ||
return paths.map(function (filePath) { | ||
var newPath = path.join.apply(path, filePath.split('/')); | ||
var startsWithSlash = filePath[0] === '/'; | ||
if (startsWithSlash) { | ||
return '/' + newPath; | ||
} | ||
return newPath; | ||
return convertPathToSystemSpecific (filePath); | ||
}); | ||
@@ -306,0 +315,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
18612
385