Skip to content

Commit bbe409d

Browse files
committed
Initial commit
0 parents  commit bbe409d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+7897
-0
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: '/'
5+
schedule:
6+
interval: weekly
7+
time: '03:00'
8+
open-pull-requests-limit: 10
9+
versioning-strategy: increase
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Add issues to OBEWDS Vue project
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
- transferred
8+
# - labeled
9+
10+
11+
jobs:
12+
add-to-project:
13+
name: Add issue to project
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/add-to-project@main
17+
with:
18+
project-url: https://github.com/orgs/obewds/projects/1
19+
github-token: ${{ secrets.ADD_TO_PROJECT_ACCESS_TOKEN }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Add Pull Requests to OBEWDS Vue project
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
# - labeled
8+
9+
jobs:
10+
add-to-project:
11+
name: Add issue to project
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/add-to-project@main
15+
with:
16+
project-url: https://github.com/orgs/obewds/projects/1
17+
github-token: ${{ secrets.ADD_TO_PROJECT_ACCESS_TOKEN }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Publish GitHub Pages
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-20.04
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
15+
- name: deploy
16+
uses: peaceiris/actions-gh-pages@v3
17+
if: ${{ github.ref == 'refs/heads/main' }}
18+
with:
19+
github_token: ${{ secrets.GITHUB_TOKEN }}
20+
publish_dir: ./docs/.vitepress/dist

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
#dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
26+
# Vitest/c8 Test Coverage Output Files
27+
coverage

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["vue.volar"]
3+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 OBE:WDS
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# vite-vue-ts-compo-pkg-starter
2+
3+
The official OBE:WDS Vite/Vue TypeScript component package development kit with Tailwind CSS, VitePress and Vitest integrations
4+
5+
![GitHub package.json version](https://img.shields.io/github/package-json/v/obewds/vite-vue-ts-compo-pkg-starter?label=Github&logo=github&style=for-the-badge)   ![npm](https://img.shields.io/npm/v/@obewds/vite-vue-ts-compo-pkg-starter?color=%23cc3534&logo=npm&style=for-the-badge)
6+
7+
![Vue.js](https://img.shields.io/badge/vuejs-%2335495e.svg?style=for-the-badge&logo=vuedotjs&logoColor=%234FC08D)   ![TailwindCSS](https://img.shields.io/badge/tailwindcss-%2338B2AC.svg?style=for-the-badge&logo=tailwind-css&logoColor=white)   ![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)   ![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white)   ![Dependabot](https://img.shields.io/badge/dependabot-025E8C?style=for-the-badge&logo=dependabot&logoColor=white)
8+
9+
<br>
10+
11+
12+
---
13+
14+
# Vue 3 + TypeScript + Vite
15+
16+
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
17+
18+
## Recommended IDE Setup
19+
20+
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
21+
22+
## Type Support For `.vue` Imports in TS
23+
24+
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's Take Over mode by following these steps:
25+
26+
1. Run `Extensions: Show Built-in Extensions` from VS Code's command palette, look for `TypeScript and JavaScript Language Features`, then right click and select `Disable (Workspace)`. By default, Take Over mode will enable itself if the default TypeScript extension is disabled.
27+
2. Reload the VS Code window by running `Developer: Reload Window` from the command palette.
28+
29+
You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471).
30+
31+
---
32+
## Getting Started With This Starter
33+
34+
Once the repo is local, you can install dependencies with:
35+
36+
```bash
37+
npm install
38+
```
39+
40+
To initialize your repository's files specific to your new repo/component name (under the `@obewds` namespace), run:
41+
42+
```bash
43+
npm run init:as -- your-repo-name
44+
```
45+
46+
And to generate all of the files after changing the names to your repo/component name, use:
47+
48+
```bash
49+
npm run publish:prep
50+
```
51+
52+
Then you can launch Vite and the Workspace app and a seperate local vite server for your docs with:
53+
54+
```bash
55+
npm run dev
56+
```
57+
```bash
58+
npm run docs:dev
59+
```
60+
61+
62+
And of course you can run tests with:
63+
64+
```bash
65+
npm run test
66+
```
67+
68+
```bash
69+
npm run coverage
70+
```
71+
72+
73+
And last but not least, you can remove the `init:as` script used to init the template files for your `@obewds` namespaced repository name, using:
74+
75+
```bash
76+
npm run delete:init:as
77+
```
78+
79+
Don't forget to **remove** the npm scripts `"init:as"` and `"delete:init:as"` from your `package.json` file after running the `delete:init:as` command!
80+
81+
> And after you've removed the npm scripts, it's safe to do a quick search of the repo files for the string `InitContent` and delete the file, and component import, and the component instance. And that will finish up clearing out all of the no longer needed content and files following the `init:as` process!
82+
83+
84+
<br>
85+
86+
---
87+
## Documentation
88+
89+
Check out the [official docs](https://obewds.github.io/vite-vue-ts-compo-pkg-starter/) for this component for more details!
90+
91+
<br>
92+
93+
94+
---
95+
## Installation
96+
97+
```bash
98+
npm install @obewds/vue-tw-el --save-dev
99+
```
100+
101+
<br>
102+
103+
104+
---
105+
## Uninstall
106+
107+
```bash
108+
npm uninstall @obewds/vue-tw-el
109+
```

dist/favicon.ico

1.12 KB
Binary file not shown.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2+
text?: string | undefined;
3+
}>, {
4+
text: string;
5+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
6+
text?: string | undefined;
7+
}>, {
8+
text: string;
9+
}>>>, {
10+
text: string;
11+
}>;
12+
export default _default;
13+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14+
declare type __VLS_TypePropsToRuntimeProps<T> = {
15+
[K in keyof T]-?: {} extends Pick<T, K> ? {
16+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
17+
} : {
18+
type: import('vue').PropType<T[K]>;
19+
required: true;
20+
};
21+
};
22+
declare type __VLS_WithDefaults<P, D> = {
23+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
24+
default: D[K];
25+
} : P[K];
26+
};

dist/types/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as ViteVueTsCompoPkgStarter } from './components/ViteVueTsCompoPkgStarter.vue';

dist/vite-vue-ts-compo-pkg-starter.cjs.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { defineComponent, openBlock, createElementBlock, Fragment, createTextVNode, toDisplayString, renderSlot } from "vue";
2+
const _hoisted_1 = /* @__PURE__ */ createTextVNode("ViteVueTsCompoPkgStarter");
3+
const _sfc_main = /* @__PURE__ */ defineComponent({
4+
props: {
5+
text: { default: "" }
6+
},
7+
setup(__props) {
8+
return (_ctx, _cache) => {
9+
return openBlock(), createElementBlock("div", null, [
10+
__props.text ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
11+
createTextVNode(toDisplayString(__props.text), 1)
12+
], 64)) : renderSlot(_ctx.$slots, "default", { key: 1 }, () => [
13+
_hoisted_1
14+
])
15+
]);
16+
};
17+
}
18+
});
19+
export { _sfc_main as ViteVueTsCompoPkgStarter };

dist/vite-vue-ts-compo-pkg-starter.iife.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vite-vue-ts-compo-pkg-starter.umd.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vite.config.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare const _default: import("vite").UserConfigExport;
2+
export default _default;

docs/.vitepress/config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// ./docs/.vitepress/config.js
2+
3+
module.exports = {
4+
base: '/vite-vue-ts-compo-pkg-starter/',
5+
title: '@obewds/vite-vue-ts-compo-pkg-starter',
6+
description: 'A documentation site for the ViteVueTsCompoPkgStarter component',
7+
markdown: {
8+
lineNumbers: true,
9+
},
10+
themeConfig: {
11+
nav: [
12+
{ text: "Home", link: "/" },
13+
{ text: "Component", link: "/component" },
14+
{ text: "Tests", link: "/tests" },
15+
{ text: "npm", link: "https://www.npmjs.com/package/@obewds/vite-vue-ts-compo-pkg-starter" },
16+
{ text: "GitHub", link: "https://github.com/obewds/vite-vue-ts-compo-pkg-starter" },
17+
],
18+
// sidebar: [
19+
// { text: "Installation", link: "/#installation" },
20+
// ],
21+
},
22+
}

docs/.vitepress/dist/assets/app.be72b5fd.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)