diff --git a/packages/pv-stylemark/helper/io-helper.js b/packages/pv-stylemark/helper/io-helper.js index 85cbb86..5a5a4af 100644 --- a/packages/pv-stylemark/helper/io-helper.js +++ b/packages/pv-stylemark/helper/io-helper.js @@ -10,7 +10,9 @@ const writeFile = async (target, reldir, filename, markup) => { }; const watchGlob = async (curGlob, callback) => { - const paths = await glob(curGlob); + const paths = await glob(curGlob, { + windowsPathsNoEscape: true, + }); const normalizedPaths = paths.map(filePath => normalize(resolve(process.cwd(), filePath))); normalizedPaths.forEach(path => { watchFile(path, () => callback()); diff --git a/packages/pv-stylemark/tasks/lsg/getLsgData.js b/packages/pv-stylemark/tasks/lsg/getLsgData.js index fa190cf..80c8178 100644 --- a/packages/pv-stylemark/tasks/lsg/getLsgData.js +++ b/packages/pv-stylemark/tasks/lsg/getLsgData.js @@ -121,7 +121,9 @@ const getDataSortedByCategory = (lsgData, config) => { const getLsgData = async (curGlob, config) => { const { componentsSrc } = getAppConfig(); - const paths = await glob(curGlob); + const paths = await glob(curGlob, { + windowsPathsNoEscape: true, + }); const normalizedPaths = paths.map(filePath => normalize(resolve(process.cwd(), filePath))); const data = await Promise.all(normalizedPaths.map(curPath => getLsgDataForPath(curPath, componentsSrc)));