From 55bcd2872933026ab223c07ea1b0e0d782cb8e07 Mon Sep 17 00:00:00 2001 From: lilliputten Date: Wed, 4 Apr 2018 17:23:08 +0300 Subject: [PATCH 1/3] Generate correct includes list on windows hosts. --- tasks/generate-index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/generate-index.js b/tasks/generate-index.js index 057a735161..4b007fffc5 100644 --- a/tasks/generate-index.js +++ b/tasks/generate-index.js @@ -20,9 +20,10 @@ function getSymbols(callback) { }); } +const srcPath = path.posix.resolve(__dirname, '../src').replace(/\\/g,'/'); function getPath(name) { - const fullPath = require.resolve(path.resolve('src', name)); - return './' + path.posix.relative('src/', fullPath); + const fullPath = require.resolve(path.resolve('src', name)).replace(/\\/g,'/'); + return './' + path.posix.relative(srcPath, fullPath); } /** From 0deecda4f56b43e087aed77b4f9ec225998744cf Mon Sep 17 00:00:00 2001 From: lilliputten Date: Wed, 4 Apr 2018 17:41:21 +0300 Subject: [PATCH 2/3] Simplified changes. --- tasks/generate-index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/generate-index.js b/tasks/generate-index.js index 4b007fffc5..0aef605809 100644 --- a/tasks/generate-index.js +++ b/tasks/generate-index.js @@ -22,8 +22,8 @@ function getSymbols(callback) { const srcPath = path.posix.resolve(__dirname, '../src').replace(/\\/g,'/'); function getPath(name) { - const fullPath = require.resolve(path.resolve('src', name)).replace(/\\/g,'/'); - return './' + path.posix.relative(srcPath, fullPath); + const fullPath = require.resolve(path.resolve('src', name)); + return './' + path.posix.relative(srcPath, fullPath.replace(/\\/g,'/')); } /** From fa92a69ff30c1a6517999e12b9427027f2c63910 Mon Sep 17 00:00:00 2001 From: lilliputten Date: Wed, 4 Apr 2018 17:47:56 +0300 Subject: [PATCH 3/3] Linter warnings fixed. --- tasks/generate-index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/generate-index.js b/tasks/generate-index.js index 0aef605809..3adfbc2ec8 100644 --- a/tasks/generate-index.js +++ b/tasks/generate-index.js @@ -20,10 +20,10 @@ function getSymbols(callback) { }); } -const srcPath = path.posix.resolve(__dirname, '../src').replace(/\\/g,'/'); +const srcPath = path.posix.resolve(__dirname, '../src').replace(/\\/g, '/'); function getPath(name) { const fullPath = require.resolve(path.resolve('src', name)); - return './' + path.posix.relative(srcPath, fullPath.replace(/\\/g,'/')); + return './' + path.posix.relative(srcPath, fullPath.replace(/\\/g, '/')); } /**