@nuxt-ignis/core 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.
- package/dist/module.d.mts +4 -3
- package/dist/module.json +1 -1
- package/dist/module.mjs +48 -28
- package/dist/runtime/plugin.d.ts +1 -1
- package/dist/types.d.mts +7 -1
- package/package.json +3 -3
package/dist/module.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
|
|
3
|
-
interface
|
|
3
|
+
interface IgnisCoreOptions {
|
|
4
|
+
active?: boolean;
|
|
4
5
|
eslint?: boolean;
|
|
5
6
|
fonts?: boolean;
|
|
6
7
|
image?: boolean;
|
|
@@ -10,7 +11,7 @@ interface ModuleOptions {
|
|
|
10
11
|
pinia?: boolean;
|
|
11
12
|
auth?: boolean;
|
|
12
13
|
}
|
|
13
|
-
declare const _default: _nuxt_schema.NuxtModule<
|
|
14
|
+
declare const _default: _nuxt_schema.NuxtModule<IgnisCoreOptions, IgnisCoreOptions, false>;
|
|
14
15
|
|
|
15
16
|
export { _default as default };
|
|
16
|
-
export type {
|
|
17
|
+
export type { IgnisCoreOptions };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver,
|
|
1
|
+
import { defineNuxtModule, createResolver, addPlugin } from '@nuxt/kit';
|
|
2
2
|
|
|
3
3
|
const module$1 = defineNuxtModule({
|
|
4
4
|
meta: {
|
|
@@ -11,56 +11,76 @@ const module$1 = defineNuxtModule({
|
|
|
11
11
|
image: true,
|
|
12
12
|
scripts: true,
|
|
13
13
|
security: true,
|
|
14
|
+
auth: true,
|
|
14
15
|
vueuse: true,
|
|
15
|
-
pinia: true
|
|
16
|
-
auth: false
|
|
16
|
+
pinia: true
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
moduleDependencies(nuxt) {
|
|
19
|
+
console.warn("@nuxt-ignis/core - module dependencies are being resolved");
|
|
20
|
+
const modules = {};
|
|
21
|
+
const nuxtoptions = nuxt.options;
|
|
22
|
+
let options = nuxtoptions.ignisCore || nuxtoptions.ignis?.core;
|
|
23
|
+
if (!options) {
|
|
24
|
+
console.warn("@nuxt-ignis/core - No options provided, setting defaults");
|
|
25
|
+
options = {
|
|
23
26
|
eslint: true,
|
|
24
27
|
fonts: true,
|
|
25
28
|
image: true,
|
|
26
29
|
scripts: true,
|
|
27
30
|
security: true,
|
|
31
|
+
auth: true,
|
|
28
32
|
vueuse: true,
|
|
29
33
|
pinia: true
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
if (options
|
|
33
|
-
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if (options?.eslint !== false) {
|
|
37
|
+
modules["@nuxt/eslint"] = {};
|
|
34
38
|
console.debug("@nuxt/eslint module installed");
|
|
35
39
|
}
|
|
36
|
-
if (options
|
|
37
|
-
|
|
40
|
+
if (options?.fonts !== false) {
|
|
41
|
+
modules["@nuxt/fonts"] = {};
|
|
38
42
|
console.debug("@nuxt/fonts module installed");
|
|
39
43
|
}
|
|
40
|
-
if (options
|
|
41
|
-
|
|
44
|
+
if (options?.image !== false) {
|
|
45
|
+
modules["@nuxt/image"] = {};
|
|
42
46
|
console.debug("@nuxt/image module installed");
|
|
43
47
|
}
|
|
44
|
-
if (options
|
|
45
|
-
|
|
48
|
+
if (options?.scripts !== false) {
|
|
49
|
+
modules["@nuxt/scripts"] = {};
|
|
46
50
|
console.debug("@nuxt/scripts module installed");
|
|
47
51
|
}
|
|
48
|
-
if (options
|
|
49
|
-
|
|
52
|
+
if (options?.security !== false) {
|
|
53
|
+
modules["nuxt-security"] = {};
|
|
50
54
|
console.debug("nuxt-security module installed");
|
|
51
55
|
}
|
|
52
|
-
if (options
|
|
53
|
-
|
|
56
|
+
if (options?.auth === true) {
|
|
57
|
+
modules["nuxt-auth-utils"] = {};
|
|
58
|
+
console.debug("nuxt-auth-utils module installed");
|
|
59
|
+
}
|
|
60
|
+
if (options?.vueuse !== false) {
|
|
61
|
+
modules["@vueuse/nuxt"] = {};
|
|
54
62
|
console.debug("@vueuse/nuxt module installed");
|
|
55
63
|
}
|
|
56
|
-
if (options
|
|
57
|
-
|
|
64
|
+
if (options?.pinia !== false) {
|
|
65
|
+
modules["@pinia/nuxt"] = {};
|
|
58
66
|
console.debug("@pinia/nuxt module installed");
|
|
59
67
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
68
|
+
return modules;
|
|
69
|
+
},
|
|
70
|
+
setup(options, nuxt) {
|
|
71
|
+
nuxt.options.runtimeConfig.public.ignis ||= {
|
|
72
|
+
core: {
|
|
73
|
+
eslint: options?.eslint || true,
|
|
74
|
+
fonts: options?.fonts || true,
|
|
75
|
+
image: options?.image || true,
|
|
76
|
+
scripts: options?.scripts || true,
|
|
77
|
+
security: options?.security || true,
|
|
78
|
+
auth: options?.auth || false,
|
|
79
|
+
vueuse: options?.vueuse || true,
|
|
80
|
+
pinia: options?.pinia || true
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
const resolver = createResolver(import.meta.url);
|
|
64
84
|
addPlugin(resolver.resolve("./runtime/plugin"));
|
|
65
85
|
}
|
|
66
86
|
});
|
package/dist/runtime/plugin.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: any;
|
|
2
2
|
export default _default;
|
package/dist/types.d.mts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
+
|
|
3
|
+
import type { default as Module } from './module.mjs'
|
|
4
|
+
|
|
5
|
+
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
+
|
|
1
7
|
export { default } from './module.mjs'
|
|
2
8
|
|
|
3
|
-
export { type
|
|
9
|
+
export { type IgnisCoreOptions } from './module.mjs'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt-ignis/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Nuxt Ignis module - Core features",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@nuxt/kit": "4.3.1",
|
|
36
|
-
"@nuxt/eslint": "^1.
|
|
36
|
+
"@nuxt/eslint": "^1.15.1",
|
|
37
37
|
"@nuxt/fonts": "0.13.0",
|
|
38
38
|
"@nuxt/image": "2.0.0",
|
|
39
39
|
"@nuxt/scripts": "0.13.2",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@nuxt/devtools": "^3.1.1",
|
|
49
|
-
"@nuxt/eslint-config": "^1.
|
|
49
|
+
"@nuxt/eslint-config": "^1.15.1",
|
|
50
50
|
"@nuxt/module-builder": "^1.0.2",
|
|
51
51
|
"@nuxt/schema": "4.3.1",
|
|
52
52
|
"@nuxt/test-utils": "^4.0.0",
|