@pinegrow/nuxt-module 1.0.0-alpha.10

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 ADDED
@@ -0,0 +1,5 @@
1
+ # @pinegrow/nuxt-module
2
+
3
+ ## Nuxt module for Pinegrow
4
+
5
+ http://www.pinegrow.com
@@ -0,0 +1,5 @@
1
+ import pkg from '@pinegrow/vite-plugin';
2
+
3
+ const liveDesigner = pkg.liveDesigner;
4
+
5
+ export { liveDesigner };
@@ -0,0 +1,5 @@
1
+ module.exports = function(...args) {
2
+ return import('./module.mjs').then(m => m.default.call(this, ...args))
3
+ }
4
+ const _meta = module.exports.meta = require('./module.json')
5
+ module.exports.getMeta = () => Promise.resolve(_meta)
@@ -0,0 +1,21 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+
3
+ interface ModuleOptions {
4
+ liveDesigner?: {
5
+ projectBase: string;
6
+ plugins: string[];
7
+ usingStandaloneVueDevtools: boolean;
8
+ routerHistoryMode: string;
9
+ iconsets: string[];
10
+ customDependencies: {
11
+ dependencies: {};
12
+ devDependencies: {};
13
+ };
14
+ customTypes: {
15
+ default: {};
16
+ };
17
+ };
18
+ }
19
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
20
+
21
+ export { ModuleOptions, _default as default };
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "pinegrow",
3
+ "configKey": "pinegrow",
4
+ "compatibility": {
5
+ "nuxt": "^3.0.0"
6
+ },
7
+ "version": "1.0.0-alpha.9"
8
+ }
@@ -0,0 +1,46 @@
1
+ import { defineNuxtModule, addVitePlugin } from '@nuxt/kit';
2
+
3
+ const module = defineNuxtModule({
4
+ meta: {
5
+ name: "pinegrow",
6
+ configKey: "pinegrow",
7
+ compatibility: {
8
+ nuxt: "^3.0.0"
9
+ }
10
+ },
11
+ defaults: {
12
+ liveDesigner: {
13
+ projectBase: "./",
14
+ plugins: [],
15
+ usingStandaloneVueDevtools: false,
16
+ routerHistoryMode: "html5",
17
+ iconsets: [],
18
+ customDependencies: {
19
+ dependencies: {},
20
+ devDependencies: {}
21
+ },
22
+ customTypes: {
23
+ default: {}
24
+ }
25
+ }
26
+ },
27
+ hooks: {},
28
+ async setup(moduleOptions, nuxt) {
29
+ if (moduleOptions.liveDesigner) {
30
+ nuxt.hook("listen", async (listenerServer) => {
31
+ try {
32
+ const { liveDesigner } = await import('./chunks/live-designer.mjs');
33
+ addVitePlugin(
34
+ liveDesigner({
35
+ ...moduleOptions.liveDesigner,
36
+ listenerServer
37
+ })
38
+ );
39
+ } catch (err) {
40
+ }
41
+ });
42
+ }
43
+ }
44
+ });
45
+
46
+ export { module as default };
@@ -0,0 +1 @@
1
+ export const liveDesigner: any;
@@ -0,0 +1,3 @@
1
+ import pkg from '@pinegrow/vite-plugin'
2
+ const liveDesigner = pkg.liveDesigner
3
+ export { liveDesigner }
@@ -0,0 +1,7 @@
1
+ declare const _default: ({ listenerServer }: {
2
+ listenerServer: any;
3
+ }) => {
4
+ name: string;
5
+ configureServer(viteDevServer: any): Promise<void>;
6
+ };
7
+ export default _default;
@@ -0,0 +1,6 @@
1
+ export default ({ listenerServer }) => ({
2
+ name: "myplugin",
3
+ async configureServer(viteDevServer) {
4
+ console.log(listenerServer.address());
5
+ }
6
+ });
@@ -0,0 +1,10 @@
1
+
2
+ import { ModuleOptions } from './module'
3
+
4
+ declare module '@nuxt/schema' {
5
+ interface NuxtConfig { ['pinegrow']?: Partial<ModuleOptions> }
6
+ interface NuxtOptions { ['pinegrow']?: ModuleOptions }
7
+ }
8
+
9
+
10
+ export { default } from './module'
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@pinegrow/nuxt-module",
3
+ "version": "1.0.0-alpha.10",
4
+ "description": "Nuxt module for Pinegrow",
5
+ "author": "Pinegrow (http://pinegrow.com/)",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "main": "./dist/module.cjs",
12
+ "module": "./dist/module.cjs",
13
+ "exports": {
14
+ ".": {
15
+ "import": "./dist/module.mjs",
16
+ "require": "./dist/module.cjs"
17
+ }
18
+ },
19
+ "types": "./dist/types.d.ts",
20
+ "keywords": [
21
+ "pinegrow",
22
+ "nuxt module"
23
+ ],
24
+ "scripts": {
25
+ "build": "nuxt-module-build",
26
+ "dev": "nuxi dev playground",
27
+ "dev:build": "nuxi build playground",
28
+ "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
29
+ "publish-alpha": "npm run increment-alpha-version && npm publish",
30
+ "increment-alpha-version": "npm version prerelease --preid=alpha",
31
+ "publish-beta": "npm run increment-beta-version && npm publish",
32
+ "increment-beta-version": "npm version prerelease --preid=beta"
33
+ },
34
+ "dependencies": {
35
+ "@nuxt/kit": "latest",
36
+ "@pinegrow/vite-plugin": "latest"
37
+ },
38
+ "devDependencies": {
39
+ "@nuxt/module-builder": "latest",
40
+ "@nuxtjs/eslint-config-typescript": "latest",
41
+ "eslint": "latest",
42
+ "nuxt": "rc"
43
+ }
44
+ }