@lotte-innovate/ui-component-test 0.2.10 → 0.2.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/post-tinymce.js +13 -5
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lotte-innovate/ui-component-test",
3
3
  "description": "Lotte UI Library",
4
- "version": "0.2.10",
4
+ "version": "0.2.12",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "files": [
package/post-tinymce.js CHANGED
@@ -1,19 +1,27 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
3
 
4
+ const sourceFile =
5
+ 'node_modules/@lotte-innovate/ui-component-test/public/tinymce/skins/ui/oxide/content.min.css';
6
+ const destinationFile = 'public/tinymce/skins/ui/oxide/content.min.css';
7
+
8
+ // sourceDir이 존재하지 않으면 로직 중단
9
+ if (!fs.existsSync(sourceFile)) {
10
+ console.error(`Error: Directory ${sourceFile} does not exist.`);
11
+ process.exit(1);
12
+ }
13
+
4
14
  function copyFile(src, dest) {
5
15
  const destDir = path.dirname(dest);
6
16
 
7
17
  if (!fs.existsSync(destDir)) {
18
+ console.log(`${destDir} 존재하지 않음`);
8
19
  fs.mkdirSync(destDir, { recursive: true });
9
20
  }
10
21
 
22
+ // 파일 복사
11
23
  fs.copyFileSync(src, dest);
12
- console.log(`tinymce 리소스 복사 완료`);
24
+ console.log(`파일이 성공적으로 복사되었습니다: ${dest}`);
13
25
  }
14
26
 
15
- // skins 파일도 같이 배포 <= 이 경로로 sourceFile 바라보게 !!!
16
- const sourceFile = 'public/tinymce/skins/ui/oxide/content.min.css';
17
- const destinationFile = 'public/tinymce/skins/ui/oxide/content.min.css';
18
-
19
27
  copyFile(sourceFile, destinationFile);