diff --git a/helpers-es5.js b/helpers-es5.js index 35c273c5..11e07f4a 100644 --- a/helpers-es5.js +++ b/helpers-es5.js @@ -16,6 +16,7 @@ var path = require('path'), mkdirp = require('mkdirp'), Jimp = require('jimp'), svg2png = require('svg2png'), + url = require('url'), File = require('vinyl'), Reflect = require('harmony-reflect'), NRC = require('node-rest-client').Client, @@ -46,7 +47,7 @@ var path = require('path'), } function relative(directory) { - return path.join(options.path, directory).replace(/\\/g, '/'); + return url.resolve(options.path, directory).replace(/\\/g, '/'); } function print(context, message) { diff --git a/helpers.js b/helpers.js index 9dd0c19d..0a0f2536 100644 --- a/helpers.js +++ b/helpers.js @@ -12,6 +12,7 @@ const path = require('path'), mkdirp = require('mkdirp'), Jimp = require('jimp'), svg2png = require('svg2png'), + url = require('url'), File = require('vinyl'), Reflect = require('harmony-reflect'), NRC = require('node-rest-client').Client, @@ -42,7 +43,7 @@ const path = require('path'), } function relative (directory) { - return path.join(options.path, directory).replace(/\\/g, '/'); + return url.resolve(options.path, directory).replace(/\\/g, '/'); } function print (context, message) { diff --git a/package.json b/package.json index 1b6334b7..59387c85 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "tinycolor2": "^1.1.2", "to-ico": "^1.1.2", "underscore": "^1.8.3", + "url": "^0.11.0", "vinyl": "^1.1.0" }, "devDependencies": {