@dxtmisha/configuration 0.3.18 → 0.4.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dxtmisha/configuration",
3
3
  "private": false,
4
- "version": "0.3.18",
4
+ "version": "0.4.0",
5
5
  "type": "module",
6
6
  "description": "Shared configuration files for DXT UI - Vite configs and TypeScript configs for building UI components",
7
7
  "keywords": [
@@ -26,8 +26,8 @@
26
26
  "url": "https://github.com/dxtmisha/dxt-ui/issues"
27
27
  },
28
28
  "files": [
29
- "viteconfig/",
30
29
  "tsconfig/",
30
+ "viteconfig/",
31
31
  "README.md",
32
32
  "package.json",
33
33
  "LICENSE"
@@ -49,6 +49,10 @@
49
49
  "types": "./viteconfig/viteFlags.config.d.ts",
50
50
  "default": "./viteconfig/viteFlags.config.js"
51
51
  },
52
+ "./viteLibraries": {
53
+ "types": "./viteconfig/viteLibraries.config.d.ts",
54
+ "default": "./viteconfig/viteLibraries.config.js"
55
+ },
52
56
  "./viteMdx": {
53
57
  "types": "./viteconfig/viteMdx.config.d.ts",
54
58
  "default": "./viteconfig/viteMdx.config.js"
@@ -3,6 +3,9 @@ import { defineConfig } from 'vite'
3
3
  import vue from '@vitejs/plugin-vue'
4
4
  import dts from 'vite-plugin-dts'
5
5
 
6
+ import autoprefixer from 'autoprefixer'
7
+ import cssnanoPlugin from 'cssnano'
8
+
6
9
  // https://vite.dev/config/
7
10
 
8
11
  /**
@@ -96,6 +99,14 @@ export const viteBasicFunction = (
96
99
  }
97
100
  }
98
101
  },
102
+ css: {
103
+ postcss: {
104
+ plugins: [
105
+ autoprefixer(),
106
+ cssnanoPlugin({ preset: 'default' })
107
+ ]
108
+ }
109
+ },
99
110
  plugins: [
100
111
  vue(),
101
112
  dts({
@@ -0,0 +1 @@
1
+ export declare const viteLibraries: {}
@@ -0,0 +1,27 @@
1
+ import fs from 'node:fs'
2
+ import path from 'node:path'
3
+ import { fileURLToPath } from 'node:url'
4
+
5
+ import { viteBasicFunction } from './viteBasicFunction.config.js'
6
+
7
+ const __filename = fileURLToPath(import.meta.url)
8
+ const __dirname = path.dirname(__filename)
9
+
10
+ // https://vite.dev/config/
11
+ export const viteLibraries = viteBasicFunction(
12
+ undefined,
13
+ undefined,
14
+ [
15
+ ...(() => {
16
+ const dir = path.resolve(__dirname, 'src/library')
17
+
18
+ if (fs.existsSync(dir)) {
19
+ return fs.readdirSync(dir)
20
+ .filter(file => file.endsWith('.ts'))
21
+ .map(file => path.join(dir, file))
22
+ }
23
+
24
+ return []
25
+ })()
26
+ ]
27
+ )