Skip to content

refactor: monorepo with ts support #498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,32 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 16
cache: npm
- run: npm ci
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build
run: npm run docs:build
run: pnpm build
- name: Build app
run: pnpm --filter docs build
- uses: actions/configure-pages@v2
- uses: actions/upload-pages-artifact@v1
with:
Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ coverage
/cypress/videos/
/cypress/screenshots/

docs/.vitepress/cache
# vitepress
.temp
cache

Icon**

Expand All @@ -29,4 +31,4 @@ Icon**
*.ntvs*
*.njsproj
*.sln
*.sw?
*.sw?
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
registry=https://registry.npmjs.org/
ignore-workspace-root-check=true
include-workspace-root=true
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"cSpell.words": [
"dropdown",
Expand All @@ -16,4 +16,4 @@
"tabindex",
"typeof"
]
}
}
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ International Telephone Input with Vue.

[![npm](https://img.shields.io/npm/dt/vue-tel-input.svg)](https://www.npmjs.com/package/vue-tel-input) [![stars](https://img.shields.io/github/stars/iamstevendao/vue-tel-input.svg)](https://github.com/iamstevendao/vue-tel-input)

<p align="center">
<img width="600" alt="In-action GIF" src="https://thumbs.gfycat.com/EducatedPoliteBluefintuna-size_restricted.gif"/>
</p>

## Documentation and Demo

[Visit the website](https://iamstevendao.com/vue-tel-input/)
Expand All @@ -29,7 +25,13 @@ International Telephone Input with Vue.
- Install the plugin:

```sh
npm install vue-tel-input
npm install vue-tel-input libphonenumber-js

# yarn
yarn add vue-tel-input libphonenumber-js

# pnpm
pnpm add vue-tel-input libphonenumber-js
```

- Add the plugin into your app:
Expand Down
1 change: 0 additions & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export default defineConfig({
{
text: 'Others',
items: [
{ text: 'Typescript Support', link: 'others/typescript-support' },
{ text: 'v3', link: 'others/v3' },
{ text: 'v2', link: 'others/v2' },
{ text: 'Credits', link: 'others/credits' },
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/theme/Layout.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script setup>
<script setup lang="ts">
import { useData } from 'vitepress'
import Home from './components/Home.vue'
import DefaultTheme from 'vitepress/theme'
Expand Down
32 changes: 8 additions & 24 deletions docs/.vitepress/theme/components/FormInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,14 @@
</div>
</template>

<script>
export default {
name: 'FormInput',
props: {
model: {
type: Object,
},
modelName: {
type: String,
},
label: {
type: String,
default: '',
},
type: {
type: String,
default: 'input',
},
items: {
type: Array,
default: () => [],
},
},
};
<script lang="ts" setup>
const { model, modelName, label = '', type = 'input', items = [] } = defineProps<{
model: Record<string, any>;
modelName: string;
label?: string;
type?: 'input' | 'checkbox' | 'radio';
items?: string[];
}>();
</script>

<style scoped>
Expand Down
Loading