
| Current Path : /var/www/html_old/abg/web/core/scripts/js/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html_old/abg/web/core/scripts/js/jqueryui-terser.js |
const fs = require('fs');
const log = require('./log');
const Terser = require('terser');
module.exports = (filePath) => {
log(`'${filePath}' is being processed.`);
// Transform the file.
const file = fs.readFileSync(filePath, 'utf-8');
Terser.minify(file).then((result) => {
fs.writeFile(`${filePath.slice(0, -3)}-min.js`, result.code, () => {
log(`'${filePath}' is finished.`);
});
});
};