From c9cb8257ee6e25237d461ba6d44449928d83023f Mon Sep 17 00:00:00 2001 From: Lee Byron Date: Sun, 20 Nov 2016 15:05:19 -0600 Subject: [PATCH] Squashed commit of the following: Closes #2 commit c925a4d4a49798f6a03c13deca3cd10626619ec8 Author: Lee Byron Date: Sun Nov 20 15:04:24 2016 -0600 update tests commit 6b45037a1088cb55a7be11dcf2b25a443cc0ef37 Merge: daf7811 afe66ec Author: Lee Byron Date: Sun Nov 20 15:03:57 2016 -0600 Merge branch 'master' of https://github.com/NicolasParada/rollup-plugin-async into NicolasParada-master commit afe66ecc7ea5704cd64b7c805d5d8858f53a52f9 Author: Lee Byron Date: Sun Nov 20 15:02:43 2016 -0600 Add comments commit b2f775f32eaf0562be693ef82c73652b46da7fe5 Author: Lee Byron Date: Sun Nov 20 14:58:14 2016 -0600 nl commit c07cbe790cbcf2ab35a6e4565d3bc8153123cf8c Author: Lee Byron Date: Sun Nov 20 14:57:47 2016 -0600 merge commit 39143c17b4a177e7e04be4806a9df1718c389c54 Author: Lee Byron Date: Sun Nov 20 14:56:48 2016 -0600 unrelated commit c1adab7cbd05e4b1af44413e4ce13cd01d0b5695 Author: Lee Byron Date: Sun Nov 20 14:55:59 2016 -0600 sp commit 37d3a528818b7859192b476102b926f82363cb18 Author: NicolasParada Date: Sat Nov 5 07:46:47 2016 -0300 semicolon commit 8e6797cce34c0e731dac4b2166ae796d079fe760 Author: NicolasParada Date: Sat Nov 5 07:40:09 2016 -0300 apply backslash replace only on win32 commit ac5094023385bc9bed6c90cca894664e91851616 Author: NicolasParada Date: Tue Oct 18 16:32:36 2016 -0300 update test commit 250cf9fe1d5b8a5423eabcf7c9d5c43371fdd973 Author: NicolasParada Date: Tue Oct 18 16:17:36 2016 -0300 replaced const by var and added semicolons commit 52feb9fa04f43f1690cf3463268fee1f60139054 Author: NicolasParada Date: Tue Oct 18 16:12:42 2016 -0300 path: replace backslashes by forward slashes --- index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 14bc8b5..dd5c31d 100644 --- a/index.js +++ b/index.js @@ -7,7 +7,7 @@ var createFilter = require('rollup-pluginutils').createFilter; module.exports = function(options) { options = options || {}; var filter = createFilter(options.include, options.exclude); - const sourceMap = options.sourceMap !== false; + var sourceMap = options.sourceMap !== false; return { name: 'async-to-gen', @@ -44,5 +44,9 @@ function getAsyncHelperFile() { fs.unlinkSync(_asyncHelperFile) }) } - return _asyncHelperFile; + + // Note that while win32 uses \ as path separator, Node require() may rely on /. + return os.platform() === 'win32' ? + _asyncHelperFile.replace(/\\/g, '/') : + _asyncHelperFile; }