dlzn-ui 1.27.0 → 1.28.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/node/prettier-config.mjs
CHANGED
|
@@ -19,7 +19,7 @@ var prettier_config_default = {
|
|
|
19
19
|
singleAttributePerLine: false,
|
|
20
20
|
singleQuote: true,
|
|
21
21
|
tabWidth: 2,
|
|
22
|
-
tailwindStylesheet: resolveOne(["
|
|
22
|
+
tailwindStylesheet: resolveOne(import.meta.url, ["../assets/css/tailwindcss-entry.css", "../src/assets/css/tailwindcss-entry.css"]),
|
|
23
23
|
trailingComma: "all",
|
|
24
24
|
useTabs: false,
|
|
25
25
|
vueIndentScriptAndStyle: false
|
package/node/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function resolveOne(paths: string[]): string;
|
|
1
|
+
export declare function resolveOne(metaUrl: string, paths: string[]): string;
|
package/node/utils/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
|
-
import { resolve } from "node:path";
|
|
3
|
-
import {
|
|
2
|
+
import { dirname, resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
4
|
//#region node/utils/index.ts
|
|
5
|
-
function resolveOne(paths) {
|
|
6
|
-
const
|
|
7
|
-
const arr = paths.map((path) => resolve(
|
|
5
|
+
function resolveOne(metaUrl, paths) {
|
|
6
|
+
const here = dirname(fileURLToPath(metaUrl));
|
|
7
|
+
const arr = paths.map((path) => resolve(here, path));
|
|
8
8
|
const result = arr.findIndex((file) => existsSync(file));
|
|
9
|
-
if (result === -1) throw new Error(
|
|
9
|
+
if (result === -1) throw new Error(`${here}:resolveOne: path not found: ${paths.join(", ")}`);
|
|
10
10
|
return arr[result];
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
package/node/vite-config.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ConfigEnv, UserConfig } from 'vite';
|
|
2
2
|
import { default as tailwindAutoReference } from 'vite-plugin-vue-tailwind-auto-reference';
|
|
3
|
-
type TailwindAutoReferenceParameters = Parameters<typeof tailwindAutoReference>;
|
|
4
3
|
interface DlznViteOptions {
|
|
5
4
|
tailwindAutoReferenceParameters?: TailwindAutoReferenceParameters;
|
|
6
5
|
}
|
|
6
|
+
type TailwindAutoReferenceParameters = Parameters<typeof tailwindAutoReference>;
|
|
7
7
|
declare const _default: (_env: ConfigEnv, options: DlznViteOptions) => UserConfig;
|
|
8
8
|
export default _default;
|
package/node/vite-config.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import tailwindAutoReference from "vite-plugin-vue-tailwind-auto-reference";
|
|
|
6
6
|
var vite_config_default = (_env, options) => {
|
|
7
7
|
return { plugins: [
|
|
8
8
|
vue({}),
|
|
9
|
-
tailwindAutoReference(options.tailwindAutoReferenceParameters?.[0] ?? resolveOne(["
|
|
9
|
+
tailwindAutoReference(options.tailwindAutoReferenceParameters?.[0] ?? resolveOne(import.meta.url, ["../assets/css/tailwindcss-entry.css", "../src/assets/css/tailwindcss-entry.css"]), options.tailwindAutoReferenceParameters?.[1]),
|
|
10
10
|
tailwindcss()
|
|
11
11
|
] };
|
|
12
12
|
};
|