@paolojulian.dev/design-system 1.0.0

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.
@@ -0,0 +1,63 @@
1
+ import { defineConfig } from 'vite';
2
+ import dts from 'vite-plugin-dts';
3
+ import react from '@vitejs/plugin-react';
4
+ import path from 'path';
5
+ import tailwindcss from 'tailwindcss';
6
+ import { viteStaticCopy } from 'vite-plugin-static-copy';
7
+
8
+ // https://vitejs.dev/config/
9
+ export default defineConfig({
10
+ plugins: [
11
+ viteStaticCopy({
12
+ targets: [
13
+ {
14
+ src: path.resolve(__dirname, 'src/assets/fonts/**/*'),
15
+ dest: 'assets/fonts',
16
+ },
17
+ {
18
+ src: 'vite.config.ts',
19
+ dest: 'vite-config',
20
+ },
21
+ {
22
+ src: 'tailwind.config.js',
23
+ dest: 'tailwind-config',
24
+ },
25
+ ],
26
+ }),
27
+ react(),
28
+ dts({ tsconfigPath: './tsconfig.node.json', rollupTypes: true }),
29
+ ],
30
+ build: {
31
+ lib: {
32
+ entry: {
33
+ index: path.resolve(__dirname, 'src/components/index.ts'),
34
+ constants: path.resolve(__dirname, 'src/constants/index.ts'),
35
+ },
36
+ name: 'PaoloJulian-DesignSystem',
37
+ fileName: (format) => `[name].${format}.js`,
38
+ },
39
+ rollupOptions: {
40
+ external: ['react', 'react-dom', 'tailwindcss'],
41
+ output: {
42
+ globals: {
43
+ react: 'React',
44
+ 'react-dom': 'ReactDOM',
45
+ tailwindcss: 'tailwindcss',
46
+ },
47
+ },
48
+ },
49
+ /**
50
+ * Generate sourcemap for each build
51
+ */
52
+ sourcemap: true,
53
+ /**
54
+ * Remove the dist folder before building
55
+ */
56
+ emptyOutDir: true,
57
+ },
58
+ css: {
59
+ postcss: {
60
+ plugins: [tailwindcss],
61
+ },
62
+ },
63
+ });
package/package.json ADDED
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "@paolojulian.dev/design-system",
3
+ "license": "MIT",
4
+ "private": false,
5
+ "version": "1.0.0",
6
+ "type": "module",
7
+ "types": "dist/index.d.ts",
8
+ "main": "dist/index.umd.js",
9
+ "module": "dist/index.es.js",
10
+ "exports": {
11
+ ".": {
12
+ "styles": "./dist/style.css",
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.es.js",
15
+ "require": "./dist/index.umd.js"
16
+ },
17
+ "./style.css": "./dist/style.css",
18
+ "./fonts/*": "./dist/assets/fonts/*",
19
+ "./tailwind-config/*": "./dist/tailwind-config/*",
20
+ "./vite-config/*": "./dist/vite-config/*"
21
+ },
22
+ "files": [
23
+ "/dist"
24
+ ],
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "scripts": {
29
+ "dev": "vite",
30
+ "build": "vite build && yarn build:css",
31
+ "build:css": "tailwindcss -i ./src/index.css -o dist/style.css --minify",
32
+ "build:storybook": "storybook build",
33
+ "lint": "eslint .",
34
+ "preview": "vite preview",
35
+ "storybook": "storybook dev -p 6006",
36
+ "publish:pack": "yarn build && npm pack --pack-destination ./packed"
37
+ },
38
+ "dependencies": {
39
+ "class-variance-authority": "^0.7.0",
40
+ "clsx": "^2.1.0",
41
+ "react": "^18.3.1",
42
+ "react-dom": "^18.3.1",
43
+ "tailwind-merge": "^2.2.0"
44
+ },
45
+ "devDependencies": {
46
+ "@chromatic-com/storybook": "^1.9.0",
47
+ "@eslint/js": "^9.9.0",
48
+ "@storybook/addon-essentials": "^8.3.1",
49
+ "@storybook/addon-interactions": "^8.3.1",
50
+ "@storybook/addon-links": "^8.3.1",
51
+ "@storybook/addon-onboarding": "^8.3.1",
52
+ "@storybook/blocks": "^8.3.1",
53
+ "@storybook/react": "^8.3.1",
54
+ "@storybook/react-vite": "^8.3.1",
55
+ "@storybook/test": "^8.3.1",
56
+ "@types/react": "^18.3.3",
57
+ "@types/react-dom": "^18.3.0",
58
+ "@vitejs/plugin-react": "^4.3.1",
59
+ "autoprefixer": "^10.4.20",
60
+ "eslint": "^9.9.0",
61
+ "eslint-plugin-react-hooks": "^5.1.0-rc.0",
62
+ "eslint-plugin-react-refresh": "^0.4.9",
63
+ "eslint-plugin-storybook": "^0.8.0",
64
+ "globals": "^15.9.0",
65
+ "postcss": "^8.4.47",
66
+ "storybook": "^8.3.1",
67
+ "tailwindcss": "^3.4.12",
68
+ "typescript": "^5.5.3",
69
+ "typescript-eslint": "^8.0.1",
70
+ "vite": "^5.4.1",
71
+ "vite-plugin-dts": "^4.2.1",
72
+ "vite-plugin-static-copy": "^1.0.6"
73
+ },
74
+ "eslintConfig": {
75
+ "extends": [
76
+ "plugin:storybook/recommended"
77
+ ]
78
+ }
79
+ }