mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
24 lines
922 B
JavaScript
24 lines
922 B
JavaScript
/* eslint-env es6 */
|
|
const glob = require('glob');
|
|
const fs = require('fs');
|
|
|
|
// "removeWOFF2": "find dist/ -type f -iname '*.woff' -delete && find dist/ -type f -iname '*.css' -exec sed -i \"s/, url\\('.*'\\) format\\('woff'\\)//g\" {} \\;",
|
|
|
|
glob('dist/*.woff', function (er, files) {
|
|
files.forEach((filePath) => {
|
|
fs.unlinkSync(filePath);
|
|
});
|
|
});
|
|
|
|
// NOTE: this would remove the dead references, but it should be no problem anyway
|
|
// glob('dist/*.css', function (er, files) {
|
|
// files.forEach((filePath) => {
|
|
// const fileContent = fs.readFileSync(filePath, { encoding: 'utf8' });
|
|
// const newFileContent = fileContent
|
|
// .replace(/,url\(.*\) format\('woff'\)/g, '')
|
|
// .replace(/,url\(.*\) format\("woff"\)/g, '')
|
|
// .replace(/url\(.*\) format\('woff'\)/g, '')
|
|
// .replace(/url\(.*\) format\("woff"\)/g, '');
|
|
// fs.writeFileSync(filePath, newFileContent);
|
|
// });
|
|
// });
|