@nemigo/configs 0.0.1 → 0.0.3

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.
@@ -1,2 +1,3 @@
1
- import type { Config } from "prettier";
1
+ import type { Config, Options } from "prettier";
2
2
  export declare const defineConfig: () => Config;
3
+ export declare const pretty: (content: string, parser: Options["parser"]) => Promise<string>;
package/dist/prettier.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { format } from "prettier";
1
2
  import * as svelte from "prettier-plugin-svelte";
2
3
  import * as css from "prettier-plugin-css-order";
3
4
  import * as arrays from "prettier-plugin-multiline-arrays";
@@ -24,3 +25,6 @@ export const defineConfig = () => ({
24
25
  },
25
26
  ],
26
27
  });
28
+ //...
29
+ const prettier = defineConfig();
30
+ export const pretty = (content, parser) => format(content, { ...prettier, parser });
@@ -1,2 +1,16 @@
1
1
  import type { Config } from "@sveltejs/kit";
2
- export declare const definePackageConfig: (runes?: boolean) => Config;
2
+ export interface SveltePackageOptions {
3
+ /**
4
+ * @default true
5
+ */
6
+ runes?: boolean;
7
+ /**
8
+ * @default true
9
+ */
10
+ isolate?: boolean;
11
+ /**
12
+ * @default {}
13
+ */
14
+ alias?: Record<string, string>;
15
+ }
16
+ export declare const definePackageConfig: ({ runes, isolate, alias }?: SveltePackageOptions) => Config;
@@ -1,5 +1,5 @@
1
1
  import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
2
- export const definePackageConfig = (runes = true) => ({
2
+ export const definePackageConfig = ({ runes = true, isolate = true, alias = {} } = {}) => ({
3
3
  /**
4
4
  * Настройки поведения svelte-компилятора
5
5
  *
@@ -31,7 +31,8 @@ export const definePackageConfig = (runes = true) => ({
31
31
  lib: "src",
32
32
  },
33
33
  alias: {
34
- "#": "src",
34
+ ...(isolate ? { "#": "src" } : {}),
35
+ ...alias,
35
36
  },
36
37
  },
37
38
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nemigo/configs",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "private": false,
5
5
  "author": {
6
6
  "name": "Vlad Logvin",