@plus-experience/design-system-carbon 0.2.6 → 0.2.7

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.
Files changed (2) hide show
  1. package/bin/setup.js +14 -14
  2. package/package.json +1 -1
package/bin/setup.js CHANGED
@@ -43,9 +43,7 @@ if (!pkg.dependencies?.next) {
43
43
  run("npm install @carbon/react @carbon/icons-react @ibm/plex clsx tailwind-merge next-themes date-fns recharts");
44
44
  log("Carbon + UI 의존성 설치");
45
45
 
46
- // 5. dev 의존성 (sass)
47
- run("npm install -D sass");
48
- log("sass 설치");
46
+ // 5. dev 의존성 — sass는 더 이상 필요 없음 (carbon.css 사전 컴파일 사용)
49
47
 
50
48
  const srcCss = path.join(cwd, "node_modules/@plus-experience/design-system-carbon/app/globals.css");
51
49
  if (fs.existsSync(srcCss)) {
@@ -61,11 +59,11 @@ if (fs.existsSync(srcCss)) {
61
59
  log("globals.css 복사");
62
60
  }
63
61
 
64
- // 7. carbon.scss 복사
65
- const srcScss = path.join(cwd, "node_modules/@plus-experience/design-system-carbon/app/carbon.scss");
66
- if (fs.existsSync(srcScss)) {
67
- fs.copyFileSync(srcScss, path.join(appDir, "carbon.scss"));
68
- log("carbon.scss 복사");
62
+ // 7. carbon.scss 더 이상 복사하지 않음 — 사전 컴파일된 carbon.css를 직접 import
63
+ const legacyScss = path.join(appDir, "carbon.scss");
64
+ if (fs.existsSync(legacyScss)) {
65
+ fs.unlinkSync(legacyScss);
66
+ log("기존 carbon.scss 제거 (carbon.css로 마이그레이션)");
69
67
  }
70
68
 
71
69
  // 8. DESIGN_SYSTEM.md + CLAUDE.md + AGENTS.md 설정
@@ -257,21 +255,23 @@ function patchLayout() {
257
255
  modified = true;
258
256
  }
259
257
 
260
- // Add carbon.scss import if not present
261
- if (!content.includes("carbon.scss")) {
262
- const importLine = 'import "./carbon.scss";';
258
+ // Migrate legacy carbon.scss import carbon.css from package
259
+ const carbonCssImport = 'import "@plus-experience/design-system-carbon/carbon.css";';
260
+ if (/import\s+["']\.\/carbon\.scss["'];?/.test(content)) {
261
+ content = content.replace(/import\s+["']\.\/carbon\.scss["'];?/, carbonCssImport);
262
+ modified = true;
263
+ } else if (!content.includes("@plus-experience/design-system-carbon/carbon.css")) {
263
264
  if (content.includes("import")) {
264
- // Add after last import
265
265
  const lastImportIdx = content.lastIndexOf("import ");
266
266
  const endOfLine = content.indexOf("\n", lastImportIdx);
267
- content = content.slice(0, endOfLine + 1) + importLine + "\n" + content.slice(endOfLine + 1);
267
+ content = content.slice(0, endOfLine + 1) + carbonCssImport + "\n" + content.slice(endOfLine + 1);
268
268
  modified = true;
269
269
  }
270
270
  }
271
271
 
272
272
  if (modified) {
273
273
  fs.writeFileSync(layoutPath, content);
274
- log("app/layout — dark 클래스 + carbon.scss import 추가");
274
+ log("app/layout — dark 클래스 + carbon.css import 추가");
275
275
  } else {
276
276
  log("app/layout — 이미 설정됨 (스킵)");
277
277
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plus-experience/design-system-carbon",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org",