Files
module-dimmer/postinstall.js
2025-12-09 21:33:36 +03:00

13 lines
428 B
JavaScript

import fse from 'fs-extra';
import path, { dirname } from 'path';
// const topDir = import.meta.dirname;
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
fse.emptyDirSync(path.join(__dirname, 'public', 'tinymce'));
fse.copySync(
path.join(__dirname, 'node_modules', 'tinymce'),
path.join(__dirname, 'public', 'tinymce'),
{ overwrite: true }
);