pyblocks/pyblocks-gui/.erb/scripts/delete-source-maps.js

16 lines
468 B
JavaScript
Raw Permalink Normal View History

2023-05-25 17:00:54 +00:00
import fs from 'fs';
import path from 'path';
import rimraf from 'rimraf';
import webpackPaths from '../configs/webpack.paths';
export default function deleteSourceMaps() {
if (fs.existsSync(webpackPaths.distMainPath))
rimraf.sync(path.join(webpackPaths.distMainPath, '*.js.map'), {
glob: true,
});
if (fs.existsSync(webpackPaths.distRendererPath))
rimraf.sync(path.join(webpackPaths.distRendererPath, '*.js.map'), {
glob: true,
});
}