@vixt/core 0.1.3 → 0.1.4
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/client/index.d.mts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/index.d.mts +4 -6
- package/dist/index.d.ts +4 -6
- package/dist/index.mjs +4 -1
- package/dist/shared/{core.66c5bb58.d.mts → core.accf0e85.d.mts} +7 -3
- package/dist/shared/{core.66c5bb58.d.ts → core.accf0e85.d.ts} +7 -3
- package/package.json +1 -1
package/dist/client/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { App, Plugin } from 'vue';
|
|
2
2
|
import { Router, RouteRecord } from 'vue-router';
|
|
3
3
|
import { Pinia } from 'pinia';
|
|
4
|
-
import { f as VixtAppConfig } from '../shared/core.
|
|
4
|
+
import { f as VixtAppConfig } from '../shared/core.accf0e85.mjs';
|
|
5
5
|
import 'vite';
|
|
6
6
|
import 'c12';
|
|
7
7
|
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { App, Plugin } from 'vue';
|
|
2
2
|
import { Router, RouteRecord } from 'vue-router';
|
|
3
3
|
import { Pinia } from 'pinia';
|
|
4
|
-
import { f as VixtAppConfig } from '../shared/core.
|
|
4
|
+
import { f as VixtAppConfig } from '../shared/core.accf0e85.js';
|
|
5
5
|
import 'vite';
|
|
6
6
|
import 'c12';
|
|
7
7
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as VixtModule, M as ModuleOptions, a as Vixt, b as VixtOptions, c as VixtConfigLayer, d as ModuleDefinition } from './shared/core.
|
|
2
|
-
export { g as ModuleMeta, P as PluginOptions, f as VixtAppConfig, e as VixtConfigLayerMeta } from './shared/core.
|
|
1
|
+
import { V as VixtModule, M as ModuleOptions, a as Vixt, b as VixtOptions, c as VixtConfigLayer, d as ModuleDefinition } from './shared/core.accf0e85.mjs';
|
|
2
|
+
export { g as ModuleMeta, P as PluginOptions, f as VixtAppConfig, e as VixtConfigLayerMeta } from './shared/core.accf0e85.mjs';
|
|
3
3
|
import { TSConfig } from 'pkg-types';
|
|
4
4
|
import Checker from 'vite-plugin-checker';
|
|
5
5
|
import * as c12 from 'c12';
|
|
@@ -26,19 +26,17 @@ interface AppHead {
|
|
|
26
26
|
interface AppOptions {
|
|
27
27
|
head?: AppHead;
|
|
28
28
|
/**
|
|
29
|
-
* @default
|
|
29
|
+
* @default /
|
|
30
30
|
*/
|
|
31
31
|
baseURL?: string;
|
|
32
32
|
/**
|
|
33
|
-
* @default '
|
|
33
|
+
* @default 'app'
|
|
34
34
|
*/
|
|
35
35
|
rootId?: string;
|
|
36
36
|
/**
|
|
37
37
|
* @default 'div'
|
|
38
38
|
*/
|
|
39
39
|
rootTag?: string;
|
|
40
|
-
/** content of main.ts */
|
|
41
|
-
main?: string;
|
|
42
40
|
/** transform main.ts */
|
|
43
41
|
transformMain?: (code: string, vixt: Vixt) => string | undefined;
|
|
44
42
|
css?: string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as VixtModule, M as ModuleOptions, a as Vixt, b as VixtOptions, c as VixtConfigLayer, d as ModuleDefinition } from './shared/core.
|
|
2
|
-
export { g as ModuleMeta, P as PluginOptions, f as VixtAppConfig, e as VixtConfigLayerMeta } from './shared/core.
|
|
1
|
+
import { V as VixtModule, M as ModuleOptions, a as Vixt, b as VixtOptions, c as VixtConfigLayer, d as ModuleDefinition } from './shared/core.accf0e85.js';
|
|
2
|
+
export { g as ModuleMeta, P as PluginOptions, f as VixtAppConfig, e as VixtConfigLayerMeta } from './shared/core.accf0e85.js';
|
|
3
3
|
import { TSConfig } from 'pkg-types';
|
|
4
4
|
import Checker from 'vite-plugin-checker';
|
|
5
5
|
import * as c12 from 'c12';
|
|
@@ -26,19 +26,17 @@ interface AppHead {
|
|
|
26
26
|
interface AppOptions {
|
|
27
27
|
head?: AppHead;
|
|
28
28
|
/**
|
|
29
|
-
* @default
|
|
29
|
+
* @default /
|
|
30
30
|
*/
|
|
31
31
|
baseURL?: string;
|
|
32
32
|
/**
|
|
33
|
-
* @default '
|
|
33
|
+
* @default 'app'
|
|
34
34
|
*/
|
|
35
35
|
rootId?: string;
|
|
36
36
|
/**
|
|
37
37
|
* @default 'div'
|
|
38
38
|
*/
|
|
39
39
|
rootTag?: string;
|
|
40
|
-
/** content of main.ts */
|
|
41
|
-
main?: string;
|
|
42
40
|
/** transform main.ts */
|
|
43
41
|
transformMain?: (code: string, vixt: Vixt) => string | undefined;
|
|
44
42
|
css?: string[];
|
package/dist/index.mjs
CHANGED
|
@@ -111,6 +111,9 @@ function defineVixtModule(definition) {
|
|
|
111
111
|
const configKey = module.meta?.configKey || module.meta?.name;
|
|
112
112
|
const defaultOptions = typeof module.defaults === "function" ? module.defaults(vixt) : module.defaults;
|
|
113
113
|
const resolvedOptions = defu(inlineOptions, configKey ? vixt.options[configKey] : {}, defaultOptions);
|
|
114
|
+
if (configKey) {
|
|
115
|
+
vixt.options[configKey] = resolvedOptions;
|
|
116
|
+
}
|
|
114
117
|
return resolvedOptions;
|
|
115
118
|
}
|
|
116
119
|
function normalizedModule(inlineOptions, vixt) {
|
|
@@ -186,7 +189,7 @@ function generateMainTs(options, vixt) {
|
|
|
186
189
|
fs.outputFileSync(path.resolve(rootDir, "src", "main.ts"), `// Generated by Vixt
|
|
187
190
|
// This file transform from '${buildDir}/main.ts'
|
|
188
191
|
`);
|
|
189
|
-
const cssTemplate = options?.css?.map((css) => `import '${css}'`).
|
|
192
|
+
const cssTemplate = options?.css?.map((css) => `import '${css}'`).join("\n");
|
|
190
193
|
let appComponentImportTempate = "";
|
|
191
194
|
let appConfigsImportTemplate = "";
|
|
192
195
|
let appConfigsMergeTemplate = "";
|
|
@@ -30,17 +30,21 @@ interface VixtOptions extends Record<string, any> {
|
|
|
30
30
|
*/
|
|
31
31
|
rootDir?: string;
|
|
32
32
|
/**
|
|
33
|
-
* @default '
|
|
33
|
+
* @default '<rootDir>/.vixt'
|
|
34
34
|
*/
|
|
35
35
|
buildDir?: string;
|
|
36
36
|
/**
|
|
37
|
-
* @default '
|
|
37
|
+
* @default '<buildDir>/types'
|
|
38
38
|
*/
|
|
39
39
|
buildTypesDir?: string;
|
|
40
40
|
/**
|
|
41
|
-
* @default '
|
|
41
|
+
* @default '<buildDir>/layers'
|
|
42
42
|
*/
|
|
43
43
|
buildLayersDir?: string;
|
|
44
|
+
/**
|
|
45
|
+
* @default '<rootDir>/src'
|
|
46
|
+
*/
|
|
47
|
+
srcDir?: string;
|
|
44
48
|
/** modules */
|
|
45
49
|
modules?: VixtModule[];
|
|
46
50
|
/** use on configResolved */
|
|
@@ -30,17 +30,21 @@ interface VixtOptions extends Record<string, any> {
|
|
|
30
30
|
*/
|
|
31
31
|
rootDir?: string;
|
|
32
32
|
/**
|
|
33
|
-
* @default '
|
|
33
|
+
* @default '<rootDir>/.vixt'
|
|
34
34
|
*/
|
|
35
35
|
buildDir?: string;
|
|
36
36
|
/**
|
|
37
|
-
* @default '
|
|
37
|
+
* @default '<buildDir>/types'
|
|
38
38
|
*/
|
|
39
39
|
buildTypesDir?: string;
|
|
40
40
|
/**
|
|
41
|
-
* @default '
|
|
41
|
+
* @default '<buildDir>/layers'
|
|
42
42
|
*/
|
|
43
43
|
buildLayersDir?: string;
|
|
44
|
+
/**
|
|
45
|
+
* @default '<rootDir>/src'
|
|
46
|
+
*/
|
|
47
|
+
srcDir?: string;
|
|
44
48
|
/** modules */
|
|
45
49
|
modules?: VixtModule[];
|
|
46
50
|
/** use on configResolved */
|