1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

JS-279: fix sed regex for windows

This commit is contained in:
Andrew Simachev 2022-09-09 08:40:50 +03:00
parent 259a24f191
commit a9b36c41b6
2 changed files with 5 additions and 2 deletions

View file

@ -13,7 +13,7 @@
"start:dev": "npm-run-all --parallel start:watch start:electron-wait-webpack",
"start:dev-win": "npm-run-all --parallel start:watch start:electron-wait-webpack-win",
"build": "webpack --mode=production --node-env=production --config webpack.config.js",
"build:deps": "webpack --config webpack.node.config.js --stats detailed | grep 'node_modules' | sed 's/.*\\(node_modules\\/[^\\/[:space:]]\\{1,\\}\\)\\/.*/\\1/' | uniq | node save-node-deps.js",
"build:deps": "webpack --config webpack.node.config.js --stats detailed | grep 'node_modules' | sed -E 's/.*(node_modules[\\/][^\\\\/[:space:]]{1,})[\\\\/].*/\\1/' | uniq | node save-node-deps.js",
"dist:mac": "npm run build:deps && webpack --progress --mode=production --node-env=production && DATE=`date '+%Y-%m-%d_%H_%M'` GIT_COMMIT=`git rev-parse --short HEAD` electron-builder --macos --arm64 --x64",
"dist:macarm": "npm run build:deps && webpack --mode=production --node-env=production && DATE=`date '+%Y-%m-%d_%H_%M'` GIT_COMMIT=`git rev-parse --short HEAD` electron-builder --macos --arm64",
"dist:macamd": "npm run build:deps && webpack --mode=production --node-env=production && DATE=`date '+%Y-%m-%d_%H_%M'` GIT_COMMIT=`git rev-parse --short HEAD` electron-builder --macos --x64",

View file

@ -21,7 +21,10 @@ stdin.on('end', function() {
lines = [ ...new Set(lines) ];
lines = lines.filter((el) => {
return el && el.match(/^node_modules/) && !el.match(new RegExp(`^node_modules/(${skipIds.join('|')})$`));
}).map((it) => { return { from: it, to: it }; });
}).map((it) => {
it = it.replace(/\\/g, '/');
return { from: it, to: it };
});
console.log(lines);