@pinegrow/nuxt-module 3.0.0-beta.7 → 3.0.0-beta.71
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/README.md +1 -1
- package/dist/module.d.ts +4 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +59 -9
- package/package.json +11 -6
package/README.md
CHANGED
package/dist/module.d.ts
CHANGED
|
@@ -2,10 +2,13 @@ import * as _nuxt_schema from '@nuxt/schema';
|
|
|
2
2
|
|
|
3
3
|
interface ModuleOptions {
|
|
4
4
|
liveDesigner?: {
|
|
5
|
+
[key in string]?: any;
|
|
6
|
+
} & {
|
|
5
7
|
repoRoot?: string;
|
|
6
8
|
configPath?: string;
|
|
7
9
|
plugins?: string[];
|
|
8
|
-
|
|
10
|
+
devtoolsKey?: string;
|
|
11
|
+
vscodeTunnelUrl?: string;
|
|
9
12
|
customTypes?: {
|
|
10
13
|
default?: {};
|
|
11
14
|
};
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -2,33 +2,83 @@ import { defineNuxtModule, addVitePlugin } from '@nuxt/kit';
|
|
|
2
2
|
|
|
3
3
|
const module = defineNuxtModule({
|
|
4
4
|
meta: {
|
|
5
|
+
// Usually npm package name of your module
|
|
5
6
|
name: "pinegrow",
|
|
7
|
+
// The key in `nuxt.config` that holds your module options
|
|
6
8
|
configKey: "pinegrow",
|
|
9
|
+
// Compatibility constraints
|
|
7
10
|
compatibility: {
|
|
8
|
-
|
|
11
|
+
// Semver version of supported nuxt versions
|
|
12
|
+
nuxt: "^3.0.0"
|
|
9
13
|
}
|
|
10
14
|
},
|
|
15
|
+
// Default configuration options for your module
|
|
11
16
|
defaults: {
|
|
12
17
|
liveDesigner: {
|
|
18
|
+
// repoRoot: './',
|
|
19
|
+
// configPath: './',
|
|
13
20
|
plugins: [],
|
|
14
|
-
|
|
21
|
+
// devtoolsKey: 'devtools',
|
|
22
|
+
// vscodeTunnelUrl: 'https://vscode.dev/tunnel/hostname',
|
|
23
|
+
// iconsets: [],
|
|
24
|
+
// routerHistoryMode: 'html5',
|
|
25
|
+
// mergeWithPackageJson: {
|
|
26
|
+
// dependencies: {},
|
|
27
|
+
// devDependencies: {},
|
|
28
|
+
// },
|
|
15
29
|
customTypes: {
|
|
16
|
-
default
|
|
30
|
+
// To apply type overrides to a specific component (overrides above default fn),
|
|
31
|
+
// ComponentName: { prop: { customType: 'icon' } },
|
|
32
|
+
// VRating: {
|
|
33
|
+
// ripple: {
|
|
34
|
+
// customType: "boolean",
|
|
35
|
+
// },
|
|
36
|
+
// },
|
|
37
|
+
// VSelect: {
|
|
38
|
+
// variant: {
|
|
39
|
+
// customType: 'select',
|
|
40
|
+
// options: ['plain', 'outlined', 'underlined', 'solo'],
|
|
41
|
+
// default: ''
|
|
42
|
+
// },
|
|
43
|
+
// density: {
|
|
44
|
+
// customType: 'select',
|
|
45
|
+
// options: ['default', 'compact', 'comfortable']
|
|
46
|
+
// },
|
|
47
|
+
// disabled: {
|
|
48
|
+
// customType: 'boolean'
|
|
49
|
+
// },
|
|
50
|
+
// appendIcon: {
|
|
51
|
+
// customType: 'icon'
|
|
52
|
+
// },
|
|
53
|
+
// }
|
|
54
|
+
// To apply type overrides to all components,
|
|
55
|
+
// all: { prop: { customType: 'icon' } },
|
|
56
|
+
default: {
|
|
57
|
+
// density: {
|
|
58
|
+
// customType: "select",
|
|
59
|
+
// // add options when customType is 'select'
|
|
60
|
+
// options: ["default", "compact", "comfortable"],
|
|
61
|
+
// },
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
tailwindcss: {
|
|
65
|
+
cssPath: "./assets/css/tailwind.css"
|
|
17
66
|
}
|
|
18
67
|
}
|
|
19
68
|
},
|
|
20
69
|
hooks: {},
|
|
21
70
|
async setup(moduleOptions, nuxt) {
|
|
22
71
|
if (moduleOptions.liveDesigner) {
|
|
72
|
+
const nuxtInstance = nuxt;
|
|
23
73
|
nuxt.hook("listen", async (listenerServer) => {
|
|
24
74
|
try {
|
|
25
75
|
const { liveDesigner } = await import('./chunks/live-designer.mjs');
|
|
26
|
-
|
|
27
|
-
liveDesigner
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
);
|
|
76
|
+
const pluginInstance = liveDesigner({
|
|
77
|
+
...moduleOptions.liveDesigner,
|
|
78
|
+
listenerServer,
|
|
79
|
+
nuxtInstance
|
|
80
|
+
});
|
|
81
|
+
addVitePlugin(pluginInstance);
|
|
32
82
|
} catch (err) {
|
|
33
83
|
console.log(err);
|
|
34
84
|
console.log(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinegrow/nuxt-module",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.71",
|
|
4
4
|
"description": "Pinegrow Nuxt Module",
|
|
5
5
|
"author": "Pinegrow (http://pinegrow.com/)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,16 +28,21 @@
|
|
|
28
28
|
"dev:build": "nuxi build playground",
|
|
29
29
|
"dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
|
|
30
30
|
"publish-beta": "npm run increment-beta-version && npm publish",
|
|
31
|
-
"increment-beta-version": "npm version prerelease --preid=beta"
|
|
31
|
+
"increment-beta-version": "npm version prerelease --preid=beta",
|
|
32
|
+
"lint": "npm run lint:fix && npm run format",
|
|
33
|
+
"lint:fix": "eslint --ext .js,.cjs,.ts,.vue --ignore-path .gitignore --fix ./src",
|
|
34
|
+
"format": "prettier --write ."
|
|
32
35
|
},
|
|
33
36
|
"dependencies": {
|
|
34
37
|
"@nuxt/kit": "latest",
|
|
35
|
-
"@pinegrow/vite-plugin": "
|
|
38
|
+
"@pinegrow/vite-plugin": "3.0.0-beta.71"
|
|
36
39
|
},
|
|
37
40
|
"devDependencies": {
|
|
38
41
|
"@nuxt/module-builder": "latest",
|
|
39
|
-
"@
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
+
"@nuxt/eslint-config": "^0.1.1",
|
|
43
|
+
"nuxt": "^3.1.0",
|
|
44
|
+
"eslint": "^8.35.0",
|
|
45
|
+
"eslint-config-prettier": "^8.7.0",
|
|
46
|
+
"prettier": "^2.8.4"
|
|
42
47
|
}
|
|
43
48
|
}
|