kdpa-components 0.0.7 → 0.0.9

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,11 +1,11 @@
1
1
  {
2
2
  "name": "kdpa-components",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "type": "module",
5
5
  "main": "./dist",
6
6
  "types": "./dist",
7
7
  "exports": {
8
- ".": "./dist/components/**"
8
+ "./**": "./dist/components/**"
9
9
  },
10
10
  "scripts": {
11
11
  "dev": "vite",
package/tsconfig.json DELETED
@@ -1,43 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- // "target": "ESNext",
4
- // "lib": ["DOM", "DOM.Iterable", "ESNext"],
5
- // "module": "ESNext",
6
- // "skipLibCheck": true,
7
-
8
- // /* Bundler mode */
9
- // "moduleResolution": "bundler",
10
- // "allowImportingTsExtensions": true,
11
- // "resolveJsonModule": true,
12
- // "isolatedModules": true,
13
- // "noEmit": true,
14
- // "jsx": "react-jsx",
15
-
16
- // /* Linting */
17
- // "strict": true,
18
- // "noUnusedLocals": true,
19
- // "noUnusedParameters": true,
20
- // "noFallthroughCasesInSwitch": true
21
-
22
- "target": "ESNext",
23
- "useDefineForClassFields": true,
24
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
25
- "allowJs": false,
26
- "allowSyntheticDefaultImports": true,
27
- "strict": true,
28
- "forceConsistentCasingInFileNames": true,
29
- "module": "ESNext",
30
- "moduleResolution": "Node",
31
- "resolveJsonModule": true,
32
- "isolatedModules": true,
33
- "noEmit": true,
34
- "jsx": "react-jsx",
35
- "declaration": true,
36
- "skipLibCheck": true,
37
- "esModuleInterop": true ,
38
- "declarationMap": true,
39
- "baseUrl": ".",
40
- },
41
- "include": ["src"],
42
- "references": [{ "path": "./tsconfig.node.json" }]
43
- }
@@ -1,10 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "skipLibCheck": true,
5
- "module": "ESNext",
6
- "moduleResolution": "bundler",
7
- "allowSyntheticDefaultImports": true
8
- },
9
- "include": ["vite.config.ts"]
10
- }
package/vite.config.ts DELETED
@@ -1,106 +0,0 @@
1
- import { defineConfig } from "vite";
2
- import react from "@vitejs/plugin-react";
3
- import dts from "vite-plugin-dts";
4
- import tsConfigPaths from "vite-tsconfig-paths";
5
-
6
- import path, { resolve } from "node:path";
7
-
8
- import glob from "glob";
9
- import { fileURLToPath } from "node:url";
10
-
11
- // https://vitejs.dev/config/
12
- export default defineConfig({
13
- plugins: [
14
- // tsConfigPaths(),
15
- dts({
16
- include: ["src/components/**/*.ts"],
17
- outputDir: "./dist/components",
18
- // insertTypesEntry: true,
19
- }),
20
- react(),
21
- ],
22
-
23
- build: {
24
- // outDir: "./build",
25
-
26
- lib: {
27
- // entry: resolve("src", "components/index.ts"),
28
- entry: Object.fromEntries(
29
- glob.sync("src/components/**/*index.ts").map((file) => [
30
- // This remove `src/` as well as the file extension from each
31
- // file, so e.g. src/nested/foo.js becomes nested/foo
32
- // path.relative(
33
- // "src/components",
34
- // file.slice(0, file.length - path.extname(file).length)
35
- // ),
36
- file,
37
- // This expands the relative paths to absolute paths, so e.g.
38
- // src/nested/foo becomes /project/src/nested/foo.js
39
- fileURLToPath(new URL(file, import.meta.url)),
40
- ])
41
- ),
42
- // entry: glob.sync("src/components/**/index.ts"),
43
-
44
- name: "KdpaComponents",
45
-
46
- formats: ["es"],
47
- // fileName: (_, name) => {
48
- // const filePath = name.split("/").slice(1, -1).join("/");
49
-
50
- // console.log("name", filePath);
51
- // return `${filePath}/index.js`;
52
- // },
53
-
54
- fileName: (_, name) => {
55
- const path = name.split("/").slice(1).join("/").split(".")[0];
56
- return `${path}.js`;
57
- },
58
- },
59
-
60
- rollupOptions: {
61
- external: ["react", "react-dom"],
62
-
63
- input: Object.fromEntries(
64
- glob.sync("src/components/**/index.ts").map((file) => [
65
- // This remove `src/` as well as the file extension from each
66
- // file, so e.g. src/nested/foo.js becomes nested/foo
67
- // path.relative(
68
- // "src/components",
69
- // file.slice(0, file.length - path.extname(file).length)
70
- // ),
71
- file,
72
- // This expands the relative paths to absolute paths, so e.g.
73
- // src/nested/foo becomes /project/src/nested/foo.js
74
- fileURLToPath(new URL(file, import.meta.url)),
75
- ])
76
- ),
77
- // input: glob.sync("src/components/**/index.ts"),
78
- output: {
79
- inlineDynamicImports: false,
80
- format: "es",
81
-
82
- // entryFileNames: "[name].js",
83
- // chunkFileNames: "[name].js",
84
- },
85
- },
86
-
87
- minify: true,
88
- },
89
- });
90
-
91
- // console.log(
92
- // Object.fromEntries(
93
- // glob.sync("src/components/**/index.ts").map((file) => [
94
- // // This remove `src/` as well as the file extension from each
95
- // // file, so e.g. src/nested/foo.js becomes nested/foo
96
- // // path.relative(
97
- // // "src/components",
98
- // // file.slice(0, file.length - path.extname(file).length)
99
- // // ),
100
- // file,
101
- // // This expands the relative paths to absolute paths, so e.g.
102
- // // src/nested/foo becomes /project/src/nested/foo.js
103
- // fileURLToPath(new URL(file, import.meta.url)),
104
- // ])
105
- // )
106
- // );