@pinegrow/vite-plugin 3.0.0-beta.134 → 3.0.0-beta.136
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/LICENSE +20 -20
- package/README.md +70 -70
- package/dist/index.cjs +1 -1
- package/dist/vue/index.js +298 -298
- package/package.json +48 -48
- package/types.d.ts +100 -100
package/package.json
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pinegrow/vite-plugin",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
4
|
-
"description": "Pinegrow Vite Plugin",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist",
|
|
8
|
-
"./types.d.ts"
|
|
9
|
-
],
|
|
10
|
-
"main": "./dist/index.cjs",
|
|
11
|
-
"module": "./dist/index.cjs",
|
|
12
|
-
"types": "./types.d.ts",
|
|
13
|
-
"exports": {
|
|
14
|
-
".": {
|
|
15
|
-
"import": "./dist/index.cjs",
|
|
16
|
-
"require": "./dist/index.cjs"
|
|
17
|
-
},
|
|
18
|
-
"./dev": {
|
|
19
|
-
"import": "./src/index.js",
|
|
20
|
-
"require": "./src/index.js"
|
|
21
|
-
},
|
|
22
|
-
"./vue": {
|
|
23
|
-
"import": "./dist/vue/index.js"
|
|
24
|
-
},
|
|
25
|
-
"./pgia": {
|
|
26
|
-
"import": "./dist/pgia/index.js"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"keywords": [
|
|
30
|
-
"pinegrow",
|
|
31
|
-
"vue-designer",
|
|
32
|
-
"vite-plugin",
|
|
33
|
-
"@pinegrow/vite-plugin"
|
|
34
|
-
],
|
|
35
|
-
"author": "Pinegrow (http://pinegrow.com/)",
|
|
36
|
-
"license": "MIT",
|
|
37
|
-
"scripts": {
|
|
38
|
-
"build:vite-plugin": "webpack -- --env mode=production vite",
|
|
39
|
-
"build:vite-plugin:dev": "webpack -- --env mode=development vite",
|
|
40
|
-
"publish-beta": "npm run increment-beta-version && npm publish",
|
|
41
|
-
"increment-beta-version": "npm version prerelease --preid=beta"
|
|
42
|
-
},
|
|
43
|
-
"dependencies": {
|
|
44
|
-
"@vue/compiler-sfc": "^3.2.45",
|
|
45
|
-
"magic-string": "^0.27.0",
|
|
46
|
-
"node-html-parser": "^5.2.0"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@pinegrow/vite-plugin",
|
|
3
|
+
"version": "3.0.0-beta.136",
|
|
4
|
+
"description": "Pinegrow Vite Plugin",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist",
|
|
8
|
+
"./types.d.ts"
|
|
9
|
+
],
|
|
10
|
+
"main": "./dist/index.cjs",
|
|
11
|
+
"module": "./dist/index.cjs",
|
|
12
|
+
"types": "./types.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./dist/index.cjs",
|
|
16
|
+
"require": "./dist/index.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./dev": {
|
|
19
|
+
"import": "./src/index.js",
|
|
20
|
+
"require": "./src/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./vue": {
|
|
23
|
+
"import": "./dist/vue/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./pgia": {
|
|
26
|
+
"import": "./dist/pgia/index.js"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"pinegrow",
|
|
31
|
+
"vue-designer",
|
|
32
|
+
"vite-plugin",
|
|
33
|
+
"@pinegrow/vite-plugin"
|
|
34
|
+
],
|
|
35
|
+
"author": "Pinegrow (http://pinegrow.com/)",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build:vite-plugin": "webpack -- --env mode=production vite",
|
|
39
|
+
"build:vite-plugin:dev": "webpack -- --env mode=development vite",
|
|
40
|
+
"publish-beta": "npm run increment-beta-version && npm publish",
|
|
41
|
+
"increment-beta-version": "npm version prerelease --preid=beta"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@vue/compiler-sfc": "^3.2.45",
|
|
45
|
+
"magic-string": "^0.27.0",
|
|
46
|
+
"node-html-parser": "^5.2.0"
|
|
47
|
+
}
|
|
48
|
+
}
|
package/types.d.ts
CHANGED
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
import type { PinegrowTailwindCSSModuleOptions } from '@pinegrow/tailwindcss-plugin'
|
|
2
|
-
import type { PluginOption as VitePluginOption } from 'vite'
|
|
3
|
-
|
|
4
|
-
interface PinegrowExternalPlugin {
|
|
5
|
-
/**
|
|
6
|
-
* Display name in Props Panel and Library Panels
|
|
7
|
-
* Eg, "My Awesome Lib 3.3.1", defaults to key if not provided
|
|
8
|
-
*/
|
|
9
|
-
name?: string
|
|
10
|
-
/**
|
|
11
|
-
* Unique key that doesn't conflict with other pinegrow frameworks
|
|
12
|
-
* Run `Object.values(pinegrow.getFrameworks()).map(fx => fx.key)` in Vue Designer's devtools console for existing keys
|
|
13
|
-
*
|
|
14
|
-
* Allowed characters - alphanumeric with hyphens or period, no spaces
|
|
15
|
-
* Eg, 'my-awesome-lib'
|
|
16
|
-
*/
|
|
17
|
-
key: string
|
|
18
|
-
/**
|
|
19
|
-
* Web-types of component library (or) pinegrow commonjs plugin
|
|
20
|
-
* Must return an absolute path
|
|
21
|
-
*
|
|
22
|
-
* Use path functions according to the project module type (commonjs/module)
|
|
23
|
-
* For eg, path.resolve(__dirname, '../relative-path/my-lib.cjs')
|
|
24
|
-
* (or)
|
|
25
|
-
* import { fileURLToPath, URL } from 'node:url'
|
|
26
|
-
* fileURLToPath(new URL('./relative-path/web-types.json', import.meta.url)) // web-types of component library
|
|
27
|
-
* fileURLToPath(new URL('./relative-path/my-lib.cjs', import.meta.url)) // pinegrow commonjs plugin
|
|
28
|
-
*/
|
|
29
|
-
pluginPath: string
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface LiveDesignerOptions {
|
|
33
|
-
/**
|
|
34
|
-
* Absolute path to the root of a monorepo.
|
|
35
|
-
* Relative path from the project root to the root of a monorepo.
|
|
36
|
-
*/
|
|
37
|
-
repoRoot?: string
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Absolute path to a custom config file (for eg, vite-dev.config.js).
|
|
41
|
-
* Relative path from the project root to a custom config file (for eg, vite-dev.config.js).
|
|
42
|
-
*/
|
|
43
|
-
configPath?: string
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Key of the devtools exposed on the window object.
|
|
47
|
-
* For instructions, check Config Panel in Vue Designer
|
|
48
|
-
*/
|
|
49
|
-
devtoolsKey?: string
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Preferred format for icons in icon-picker - https://github.com/antfu/icones/blob/main/src/utils/case.ts
|
|
53
|
-
* To see the different formats, go to https://icones.js.org/collection/mdi, turn off name copying mode if active, select an icon. In the bottom drawer, next to the icon-name & copy icon, there is dropup icon. Click the drop-up to see the different formats.
|
|
54
|
-
* * @default 'unocss' // For eg, i-material-symbols-home
|
|
55
|
-
*
|
|
56
|
-
*/
|
|
57
|
-
iconPreferredCase?:
|
|
58
|
-
| 'unocss'
|
|
59
|
-
| 'bare'
|
|
60
|
-
| 'barePascal'
|
|
61
|
-
| 'iconify'
|
|
62
|
-
| 'dash'
|
|
63
|
-
| 'camel'
|
|
64
|
-
| 'pascal'
|
|
65
|
-
| 'component'
|
|
66
|
-
| 'componentKebab'
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Router history modes - 'html5', 'hash'
|
|
70
|
-
* @default 'html5'
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
|
-
routerHistoryMode?: string //
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Array of Pinegrow plugins (npm package names)
|
|
77
|
-
* To use file-based Pinegrow Plugins, provide the absolute path of the plugin file, for eg, [path.resolve(__dirname, './pg-plugin/index.js')] as pluginPath, along with a unique key
|
|
78
|
-
*/
|
|
79
|
-
plugins?: PinegrowExternalPlugin[] | string | string[]
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Pinegrow TailwindCSS plugin options
|
|
83
|
-
*/
|
|
84
|
-
tailwindcss?: PinegrowTailwindCSSModuleOptions
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
interface PinegrowVitePlugin<VitePluginOption> {
|
|
88
|
-
/**
|
|
89
|
-
* Pinegrow Live Designer options
|
|
90
|
-
* For details, check https://pinegrow.com/vue-designer
|
|
91
|
-
*/
|
|
92
|
-
liveDesigner?: {
|
|
93
|
-
[key in string]?: any
|
|
94
|
-
} & LiveDesignerOptions
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
declare function export_default(liveDesigner: LiveDesignerOptions): PinegrowVitePlugin
|
|
98
|
-
|
|
99
|
-
export { PinegrowVitePlugin, LiveDesignerOptions, export_default as default, export_default as liveDesigner }
|
|
100
|
-
|
|
1
|
+
import type { PinegrowTailwindCSSModuleOptions } from '@pinegrow/tailwindcss-plugin'
|
|
2
|
+
import type { PluginOption as VitePluginOption } from 'vite'
|
|
3
|
+
|
|
4
|
+
interface PinegrowExternalPlugin {
|
|
5
|
+
/**
|
|
6
|
+
* Display name in Props Panel and Library Panels
|
|
7
|
+
* Eg, "My Awesome Lib 3.3.1", defaults to key if not provided
|
|
8
|
+
*/
|
|
9
|
+
name?: string
|
|
10
|
+
/**
|
|
11
|
+
* Unique key that doesn't conflict with other pinegrow frameworks
|
|
12
|
+
* Run `Object.values(pinegrow.getFrameworks()).map(fx => fx.key)` in Vue Designer's devtools console for existing keys
|
|
13
|
+
*
|
|
14
|
+
* Allowed characters - alphanumeric with hyphens or period, no spaces
|
|
15
|
+
* Eg, 'my-awesome-lib'
|
|
16
|
+
*/
|
|
17
|
+
key: string
|
|
18
|
+
/**
|
|
19
|
+
* Web-types of component library (or) pinegrow commonjs plugin
|
|
20
|
+
* Must return an absolute path
|
|
21
|
+
*
|
|
22
|
+
* Use path functions according to the project module type (commonjs/module)
|
|
23
|
+
* For eg, path.resolve(__dirname, '../relative-path/my-lib.cjs')
|
|
24
|
+
* (or)
|
|
25
|
+
* import { fileURLToPath, URL } from 'node:url'
|
|
26
|
+
* fileURLToPath(new URL('./relative-path/web-types.json', import.meta.url)) // web-types of component library
|
|
27
|
+
* fileURLToPath(new URL('./relative-path/my-lib.cjs', import.meta.url)) // pinegrow commonjs plugin
|
|
28
|
+
*/
|
|
29
|
+
pluginPath: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface LiveDesignerOptions {
|
|
33
|
+
/**
|
|
34
|
+
* Absolute path to the root of a monorepo.
|
|
35
|
+
* Relative path from the project root to the root of a monorepo.
|
|
36
|
+
*/
|
|
37
|
+
repoRoot?: string
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Absolute path to a custom config file (for eg, vite-dev.config.js).
|
|
41
|
+
* Relative path from the project root to a custom config file (for eg, vite-dev.config.js).
|
|
42
|
+
*/
|
|
43
|
+
configPath?: string
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Key of the devtools exposed on the window object.
|
|
47
|
+
* For instructions, check Config Panel in Vue Designer
|
|
48
|
+
*/
|
|
49
|
+
devtoolsKey?: string
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Preferred format for icons in icon-picker - https://github.com/antfu/icones/blob/main/src/utils/case.ts
|
|
53
|
+
* To see the different formats, go to https://icones.js.org/collection/mdi, turn off name copying mode if active, select an icon. In the bottom drawer, next to the icon-name & copy icon, there is dropup icon. Click the drop-up to see the different formats.
|
|
54
|
+
* * @default 'unocss' // For eg, i-material-symbols-home
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
iconPreferredCase?:
|
|
58
|
+
| 'unocss'
|
|
59
|
+
| 'bare'
|
|
60
|
+
| 'barePascal'
|
|
61
|
+
| 'iconify'
|
|
62
|
+
| 'dash'
|
|
63
|
+
| 'camel'
|
|
64
|
+
| 'pascal'
|
|
65
|
+
| 'component'
|
|
66
|
+
| 'componentKebab'
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Router history modes - 'html5', 'hash'
|
|
70
|
+
* @default 'html5'
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
routerHistoryMode?: string //
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Array of Pinegrow plugins (npm package names)
|
|
77
|
+
* To use file-based Pinegrow Plugins, provide the absolute path of the plugin file, for eg, [path.resolve(__dirname, './pg-plugin/index.js')] as pluginPath, along with a unique key
|
|
78
|
+
*/
|
|
79
|
+
plugins?: PinegrowExternalPlugin[] | string | string[]
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Pinegrow TailwindCSS plugin options
|
|
83
|
+
*/
|
|
84
|
+
tailwindcss?: PinegrowTailwindCSSModuleOptions
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface PinegrowVitePlugin<VitePluginOption> {
|
|
88
|
+
/**
|
|
89
|
+
* Pinegrow Live Designer options
|
|
90
|
+
* For details, check https://pinegrow.com/vue-designer
|
|
91
|
+
*/
|
|
92
|
+
liveDesigner?: {
|
|
93
|
+
[key in string]?: any
|
|
94
|
+
} & LiveDesignerOptions
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
declare function export_default(liveDesigner: LiveDesignerOptions): PinegrowVitePlugin
|
|
98
|
+
|
|
99
|
+
export { PinegrowVitePlugin, LiveDesignerOptions, export_default as default, export_default as liveDesigner }
|
|
100
|
+
|