vite-plugin-vue-dx 0.0.2 → 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.
- package/dist/index.cjs +32 -28
- package/dist/index.d.cts +32 -18
- package/dist/index.d.mts +32 -18
- package/dist/index.d.ts +32 -18
- package/dist/index.mjs +26 -21
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -1,40 +1,44 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const AutoImport = require('unplugin-auto-import/vite');
|
|
9
|
-
const Components = require('unplugin-vue-components/vite');
|
|
10
|
-
const utils = require('@antfu/utils');
|
|
3
|
+
const fontaine$1 = require('fontaine');
|
|
4
|
+
const jsx = require('@vitejs/plugin-vue-jsx');
|
|
5
|
+
const devtools = require('vite-plugin-vue-devtools');
|
|
6
|
+
const console = require('unplugin-turbo-console/vite');
|
|
7
|
+
const components = require('unplugin-vue-components/vite');
|
|
11
8
|
const resolvers = require('unplugin-vue-components/resolvers');
|
|
9
|
+
const imports = require('unplugin-auto-import/vite');
|
|
12
10
|
|
|
13
11
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
14
12
|
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
13
|
+
const jsx__default = /*#__PURE__*/_interopDefaultCompat(jsx);
|
|
14
|
+
const devtools__default = /*#__PURE__*/_interopDefaultCompat(devtools);
|
|
15
|
+
const console__default = /*#__PURE__*/_interopDefaultCompat(console);
|
|
16
|
+
const components__default = /*#__PURE__*/_interopDefaultCompat(components);
|
|
17
|
+
const imports__default = /*#__PURE__*/_interopDefaultCompat(imports);
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
if (config === false || optional && !config)
|
|
23
|
-
return [];
|
|
24
|
-
return plugin(defaults ? utils.deepMerge(defaults, config || {}) : config);
|
|
25
|
-
}
|
|
19
|
+
const fontaine = fontaine$1.FontaineTransform.vite;
|
|
26
20
|
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
21
|
+
const plugins = { components: components__default, console: console__default, devtools: devtools__default, fontaine, imports: imports__default, jsx: jsx__default };
|
|
22
|
+
function VueDX(config = {}) {
|
|
23
|
+
const list = [];
|
|
24
|
+
for (const [key, plugin] of Object.entries(plugins)) {
|
|
25
|
+
const args = config[key];
|
|
26
|
+
if (args) {
|
|
27
|
+
list.push(
|
|
28
|
+
plugin(args === true ? void 0 : args)
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return list;
|
|
33
|
+
}
|
|
36
34
|
|
|
37
|
-
exports.
|
|
35
|
+
exports.jsx = jsx__default;
|
|
36
|
+
exports.devtools = devtools__default;
|
|
37
|
+
exports.console = console__default;
|
|
38
|
+
exports.components = components__default;
|
|
39
|
+
exports.imports = imports__default;
|
|
40
|
+
exports.VueDX = VueDX;
|
|
41
|
+
exports.fontaine = fontaine;
|
|
38
42
|
Object.keys(resolvers).forEach(function (k) {
|
|
39
43
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = resolvers[k];
|
|
40
44
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,23 +1,37 @@
|
|
|
1
|
-
import * as unplugin_vue_components_types from 'unplugin-vue-components/types';
|
|
2
1
|
import * as unplugin_auto_import_types from 'unplugin-auto-import/types';
|
|
3
|
-
import * as
|
|
2
|
+
import * as _fontaine from 'fontaine';
|
|
4
3
|
import * as unplugin_turbo_console_types from 'unplugin-turbo-console/types';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import * as vite from 'vite';
|
|
5
|
+
import * as unplugin_vue_components_types from 'unplugin-vue-components/types';
|
|
6
|
+
import * as unplugin_auto_import from 'unplugin-auto-import';
|
|
7
|
+
import devtools from 'vite-plugin-vue-devtools';
|
|
8
|
+
export { default as devtools } from 'vite-plugin-vue-devtools';
|
|
9
|
+
import jsx from '@vitejs/plugin-vue-jsx';
|
|
10
|
+
export { default as jsx } from '@vitejs/plugin-vue-jsx';
|
|
11
|
+
export { default as console } from 'unplugin-turbo-console/vite';
|
|
12
|
+
export { default as components } from 'unplugin-vue-components/vite';
|
|
13
|
+
export { default as imports } from 'unplugin-auto-import/vite';
|
|
7
14
|
export * from 'unplugin-vue-components/resolvers';
|
|
8
15
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
type ImportPresets = Parameters<typeof unplugin_auto_import['default']['vite']>[0]['imports'];
|
|
17
|
+
/** Improve font loading using {@link https://github.com/unjs/fontaine fontaine} */
|
|
18
|
+
declare const fontaine: (options: _fontaine.FontaineTransformOptions) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
19
|
+
|
|
20
|
+
declare const plugins: {
|
|
21
|
+
components: (options?: unplugin_vue_components_types.Options | undefined) => vite.Plugin<any> & {
|
|
22
|
+
api: unplugin_vue_components_types.PublicPluginAPI;
|
|
23
|
+
};
|
|
24
|
+
console: (options?: unplugin_turbo_console_types.Options | undefined) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
25
|
+
devtools: typeof devtools;
|
|
26
|
+
fontaine: (options: _fontaine.FontaineTransformOptions) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
27
|
+
imports: (options?: unplugin_auto_import_types.Options | undefined) => any;
|
|
28
|
+
jsx: typeof jsx;
|
|
29
|
+
};
|
|
30
|
+
type PluginMap = typeof plugins;
|
|
31
|
+
type PluginOption<T> = T extends undefined ? T | boolean : T | false;
|
|
32
|
+
type VueDXConfig = Partial<{
|
|
33
|
+
[K in keyof PluginMap]: PluginOption<Parameters<PluginMap[K]>[0]>;
|
|
34
|
+
}>;
|
|
35
|
+
declare function VueDX(config?: VueDXConfig): any[];
|
|
22
36
|
|
|
23
|
-
export { type
|
|
37
|
+
export { type ImportPresets, VueDX, type VueDXConfig, fontaine };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,23 +1,37 @@
|
|
|
1
|
-
import * as unplugin_vue_components_types from 'unplugin-vue-components/types';
|
|
2
1
|
import * as unplugin_auto_import_types from 'unplugin-auto-import/types';
|
|
3
|
-
import * as
|
|
2
|
+
import * as _fontaine from 'fontaine';
|
|
4
3
|
import * as unplugin_turbo_console_types from 'unplugin-turbo-console/types';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import * as vite from 'vite';
|
|
5
|
+
import * as unplugin_vue_components_types from 'unplugin-vue-components/types';
|
|
6
|
+
import * as unplugin_auto_import from 'unplugin-auto-import';
|
|
7
|
+
import devtools from 'vite-plugin-vue-devtools';
|
|
8
|
+
export { default as devtools } from 'vite-plugin-vue-devtools';
|
|
9
|
+
import jsx from '@vitejs/plugin-vue-jsx';
|
|
10
|
+
export { default as jsx } from '@vitejs/plugin-vue-jsx';
|
|
11
|
+
export { default as console } from 'unplugin-turbo-console/vite';
|
|
12
|
+
export { default as components } from 'unplugin-vue-components/vite';
|
|
13
|
+
export { default as imports } from 'unplugin-auto-import/vite';
|
|
7
14
|
export * from 'unplugin-vue-components/resolvers';
|
|
8
15
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
type ImportPresets = Parameters<typeof unplugin_auto_import['default']['vite']>[0]['imports'];
|
|
17
|
+
/** Improve font loading using {@link https://github.com/unjs/fontaine fontaine} */
|
|
18
|
+
declare const fontaine: (options: _fontaine.FontaineTransformOptions) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
19
|
+
|
|
20
|
+
declare const plugins: {
|
|
21
|
+
components: (options?: unplugin_vue_components_types.Options | undefined) => vite.Plugin<any> & {
|
|
22
|
+
api: unplugin_vue_components_types.PublicPluginAPI;
|
|
23
|
+
};
|
|
24
|
+
console: (options?: unplugin_turbo_console_types.Options | undefined) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
25
|
+
devtools: typeof devtools;
|
|
26
|
+
fontaine: (options: _fontaine.FontaineTransformOptions) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
27
|
+
imports: (options?: unplugin_auto_import_types.Options | undefined) => any;
|
|
28
|
+
jsx: typeof jsx;
|
|
29
|
+
};
|
|
30
|
+
type PluginMap = typeof plugins;
|
|
31
|
+
type PluginOption<T> = T extends undefined ? T | boolean : T | false;
|
|
32
|
+
type VueDXConfig = Partial<{
|
|
33
|
+
[K in keyof PluginMap]: PluginOption<Parameters<PluginMap[K]>[0]>;
|
|
34
|
+
}>;
|
|
35
|
+
declare function VueDX(config?: VueDXConfig): any[];
|
|
22
36
|
|
|
23
|
-
export { type
|
|
37
|
+
export { type ImportPresets, VueDX, type VueDXConfig, fontaine };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,37 @@
|
|
|
1
|
-
import * as unplugin_vue_components_types from 'unplugin-vue-components/types';
|
|
2
1
|
import * as unplugin_auto_import_types from 'unplugin-auto-import/types';
|
|
3
|
-
import * as
|
|
2
|
+
import * as _fontaine from 'fontaine';
|
|
4
3
|
import * as unplugin_turbo_console_types from 'unplugin-turbo-console/types';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import * as vite from 'vite';
|
|
5
|
+
import * as unplugin_vue_components_types from 'unplugin-vue-components/types';
|
|
6
|
+
import * as unplugin_auto_import from 'unplugin-auto-import';
|
|
7
|
+
import devtools from 'vite-plugin-vue-devtools';
|
|
8
|
+
export { default as devtools } from 'vite-plugin-vue-devtools';
|
|
9
|
+
import jsx from '@vitejs/plugin-vue-jsx';
|
|
10
|
+
export { default as jsx } from '@vitejs/plugin-vue-jsx';
|
|
11
|
+
export { default as console } from 'unplugin-turbo-console/vite';
|
|
12
|
+
export { default as components } from 'unplugin-vue-components/vite';
|
|
13
|
+
export { default as imports } from 'unplugin-auto-import/vite';
|
|
7
14
|
export * from 'unplugin-vue-components/resolvers';
|
|
8
15
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
type ImportPresets = Parameters<typeof unplugin_auto_import['default']['vite']>[0]['imports'];
|
|
17
|
+
/** Improve font loading using {@link https://github.com/unjs/fontaine fontaine} */
|
|
18
|
+
declare const fontaine: (options: _fontaine.FontaineTransformOptions) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
19
|
+
|
|
20
|
+
declare const plugins: {
|
|
21
|
+
components: (options?: unplugin_vue_components_types.Options | undefined) => vite.Plugin<any> & {
|
|
22
|
+
api: unplugin_vue_components_types.PublicPluginAPI;
|
|
23
|
+
};
|
|
24
|
+
console: (options?: unplugin_turbo_console_types.Options | undefined) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
25
|
+
devtools: typeof devtools;
|
|
26
|
+
fontaine: (options: _fontaine.FontaineTransformOptions) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
27
|
+
imports: (options?: unplugin_auto_import_types.Options | undefined) => any;
|
|
28
|
+
jsx: typeof jsx;
|
|
29
|
+
};
|
|
30
|
+
type PluginMap = typeof plugins;
|
|
31
|
+
type PluginOption<T> = T extends undefined ? T | boolean : T | false;
|
|
32
|
+
type VueDXConfig = Partial<{
|
|
33
|
+
[K in keyof PluginMap]: PluginOption<Parameters<PluginMap[K]>[0]>;
|
|
34
|
+
}>;
|
|
35
|
+
declare function VueDX(config?: VueDXConfig): any[];
|
|
22
36
|
|
|
23
|
-
export { type
|
|
37
|
+
export { type ImportPresets, VueDX, type VueDXConfig, fontaine };
|
package/dist/index.mjs
CHANGED
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import
|
|
1
|
+
import { FontaineTransform } from 'fontaine';
|
|
2
|
+
import jsx from '@vitejs/plugin-vue-jsx';
|
|
3
|
+
export { default as jsx } from '@vitejs/plugin-vue-jsx';
|
|
4
|
+
import devtools from 'vite-plugin-vue-devtools';
|
|
5
|
+
export { default as devtools } from 'vite-plugin-vue-devtools';
|
|
6
|
+
import console from 'unplugin-turbo-console/vite';
|
|
7
|
+
export { default as console } from 'unplugin-turbo-console/vite';
|
|
8
|
+
import components from 'unplugin-vue-components/vite';
|
|
9
|
+
export { default as components } from 'unplugin-vue-components/vite';
|
|
7
10
|
export * from 'unplugin-vue-components/resolvers';
|
|
11
|
+
import imports from 'unplugin-auto-import/vite';
|
|
12
|
+
export { default as imports } from 'unplugin-auto-import/vite';
|
|
8
13
|
|
|
9
|
-
|
|
10
|
-
if (config === false || optional && !config)
|
|
11
|
-
return [];
|
|
12
|
-
return plugin(defaults ? deepMerge(defaults, config || {}) : config);
|
|
13
|
-
}
|
|
14
|
+
const fontaine = FontaineTransform.vite;
|
|
14
15
|
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
const plugins = { components, console, devtools, fontaine, imports, jsx };
|
|
17
|
+
function VueDX(config = {}) {
|
|
18
|
+
const list = [];
|
|
19
|
+
for (const [key, plugin] of Object.entries(plugins)) {
|
|
20
|
+
const args = config[key];
|
|
21
|
+
if (args) {
|
|
22
|
+
list.push(
|
|
23
|
+
plugin(args === true ? void 0 : args)
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return list;
|
|
28
|
+
}
|
|
24
29
|
|
|
25
|
-
export {
|
|
30
|
+
export { VueDX, fontaine };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-vue-dx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"description": "Improves dx by using various vite plugins out of the box",
|
|
6
6
|
"author": "Fahadul Islam @dapotatoman",
|
|
7
7
|
"license": "MIT",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@antfu/utils": "^0.7.7",
|
|
34
34
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
35
|
+
"fontaine": "^0.5.0",
|
|
35
36
|
"unplugin-auto-import": "^0.17.5",
|
|
36
37
|
"unplugin-icons": "^0.18.5",
|
|
37
38
|
"unplugin-turbo-console": "^1.4.0",
|