@iyulab/components 1.0.7 → 1.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@iyulab/components",
3
3
  "description": "web-components library based on lit-element made by iyulab",
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "components",
@@ -4,6 +4,8 @@ interface PluginOptions {
4
4
  input?: string;
5
5
  /** React 래퍼 출력 폴더 - 빌드 outDir 기준 상대 경로 (기본값: 'react') */
6
6
  output?: string;
7
+ /** 래퍼 생성에서 제외할 glob 패턴 목록 (cwd: 프로젝트 루트) */
8
+ exclude?: string[];
7
9
  }
8
10
  /**
9
11
  * Lit Element 컴포넌트를 React 래퍼로 자동 생성하는 Vite 플러그인
@@ -21,7 +21,11 @@ export default function reactWrapperPlugin(options) {
21
21
  log('Generating React wrappers...');
22
22
  // 컴포넌트 수집
23
23
  const inputPattern = (options.input || 'src/components') + '/**/*.ts';
24
- const files = globSync(inputPattern, { cwd: rootDir, absolute: true });
24
+ let files = globSync(inputPattern, { cwd: rootDir, absolute: true });
25
+ if (options.exclude?.length) {
26
+ const excluded = new Set(options.exclude.flatMap(p => globSync(p, { cwd: rootDir, absolute: true })));
27
+ files = files.filter((f) => !excluded.has(f));
28
+ }
25
29
  const components = files.flatMap((f) => parseComponent(f));
26
30
  if (components.length === 0) {
27
31
  log('No components found.');