@skirtle/create-vue-lib 0.0.8 → 0.0.9
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/index.cjs +1 -1
- package/dist/template/base/config/packages/@projectName@/{src/global.d.ts.ejs → env.d.ts.ejs} +2 -0
- package/dist/template/base/examples/packages/@projectName@/src/components/ExampleComponent.vue.ejs +1 -4
- package/dist/template/base/examples/packages/@projectName@/src/components/MyPanel.vue +5 -0
- package/dist/template/base/examples/packages/@projectName@/src/components/MyPanelSection.vue.ejs +25 -0
- package/dist/template/base/examples/packages/@projectName@/src/{index.ts → index.ts.ejs} +7 -0
- package/dist/template/playground/config/packages/playground/env.d.ts +1 -1
- package/dist/template/vitepress/config/packages/docs/env.d.ts +1 -1
- package/package.json +1 -1
- package/dist/template/base/config/packages/@projectName@/env.d.ts +0 -1
- package/dist/template/base/examples/packages/@projectName@/src/components/MyPanelSection.vue +0 -15
package/dist/index.cjs
CHANGED
|
@@ -5697,7 +5697,7 @@ var import_picocolors = __toESM(require_picocolors(), 1);
|
|
|
5697
5697
|
// package.json
|
|
5698
5698
|
var package_default = {
|
|
5699
5699
|
name: "@skirtle/create-vue-lib",
|
|
5700
|
-
version: "0.0.
|
|
5700
|
+
version: "0.0.9",
|
|
5701
5701
|
author: "skirtle",
|
|
5702
5702
|
license: "MIT",
|
|
5703
5703
|
description: "Create a library using Vue and Vite",
|
package/dist/template/base/examples/packages/@projectName@/src/components/ExampleComponent.vue.ejs
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
import { ref } from 'vue'
|
|
3
3
|
|
|
4
4
|
if (__DEV__) {
|
|
5
|
-
console.log('
|
|
6
|
-
<%_ if (config.includeTestVariable) { _%>
|
|
7
|
-
console.log(`__TEST__: ${__TEST__}`)
|
|
8
|
-
<%_ } _%>
|
|
5
|
+
console.log('[<%- config.scopedPackageName %>] creating ExampleComponent')
|
|
9
6
|
}
|
|
10
7
|
|
|
11
8
|
const msg = ref('Hello world!')
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { provide } from 'vue'
|
|
2
3
|
import MyPanelSection from './MyPanelSection.vue'
|
|
3
4
|
|
|
4
5
|
defineProps<{
|
|
5
6
|
title?: string
|
|
6
7
|
footer?: string
|
|
7
8
|
}>()
|
|
9
|
+
|
|
10
|
+
if (__DEV__) {
|
|
11
|
+
provide('MyPanel', true)
|
|
12
|
+
}
|
|
8
13
|
</script>
|
|
9
14
|
|
|
10
15
|
<template>
|
package/dist/template/base/examples/packages/@projectName@/src/components/MyPanelSection.vue.ejs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { inject, provide } from 'vue'
|
|
3
|
+
|
|
4
|
+
if (__DEV__) {
|
|
5
|
+
const insideMyPanel = inject('MyPanel', false)
|
|
6
|
+
|
|
7
|
+
if (!insideMyPanel) {
|
|
8
|
+
console.warn('[<%- config.scopedPackageName %>] MyPanelSection can only be used inside MyPanel')
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
provide('MyPanel', false)
|
|
12
|
+
}
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div class="panel-section">
|
|
17
|
+
<slot />
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<style scoped>
|
|
22
|
+
.panel-section {
|
|
23
|
+
padding: 10px;
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
export { default as ExampleComponent } from './components/ExampleComponent.vue'
|
|
2
2
|
export { default as MyPanel } from './components/MyPanel.vue'
|
|
3
3
|
export { default as MyPanelSection } from './components/MyPanelSection.vue'
|
|
4
|
+
|
|
5
|
+
if (__DEV__) {
|
|
6
|
+
console.log('[<%- config.scopedPackageName %>] dev mode')
|
|
7
|
+
<%_ if (config.includeTestVariable) { _%>
|
|
8
|
+
console.log(`[<%- config.scopedPackageName %>] __TEST__: ${__TEST__}`)
|
|
9
|
+
<%_ } _%>
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|