@lotte-innovate/ui-component-test 0.2.11 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/post-tinymce.js +16 -3
package/package.json
CHANGED
package/post-tinymce.js
CHANGED
@@ -1,14 +1,27 @@
|
|
1
1
|
import fs from 'fs';
|
2
2
|
import path from 'path';
|
3
|
+
import { fileURLToPath } from 'url';
|
3
4
|
|
4
|
-
const
|
5
|
-
|
6
|
-
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
6
|
+
const __dirname = path.dirname(__filename);
|
7
|
+
|
8
|
+
const sourceFile = path.join(
|
9
|
+
__dirname,
|
10
|
+
'node_modules/@lotte-innovate/ui-component-test/public/tinymce/skins/ui/oxide/content.min.css',
|
11
|
+
);
|
12
|
+
const destinationFile = path.join(__dirname, 'public/tinymce/skins/ui/oxide/content.min.css');
|
13
|
+
|
14
|
+
// sourceDir이 존재하지 않으면 로직 중단
|
15
|
+
if (!fs.existsSync(sourceFile)) {
|
16
|
+
console.error(`Error: Directory ${sourceFile} does not exist.`);
|
17
|
+
process.exit(1);
|
18
|
+
}
|
7
19
|
|
8
20
|
function copyFile(src, dest) {
|
9
21
|
const destDir = path.dirname(dest);
|
10
22
|
|
11
23
|
if (!fs.existsSync(destDir)) {
|
24
|
+
console.log(`${destDir} 존재하지 않음`);
|
12
25
|
fs.mkdirSync(destDir, { recursive: true });
|
13
26
|
}
|
14
27
|
|