Skip to content

Commit

Permalink
build: Rebuild with vite
Browse files Browse the repository at this point in the history
  • Loading branch information
iamstevendao committed Jul 4, 2022
1 parent 8fd6f11 commit 52f6f2a
Show file tree
Hide file tree
Showing 48 changed files with 2,526 additions and 43,890 deletions.
1 change: 0 additions & 1 deletion .envrc

This file was deleted.

5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

11 changes: 11 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* eslint-env node */
require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
"root": true,
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/eslint-config-typescript/recommended"
]
}
44 changes: 0 additions & 44 deletions .eslintrc.js

This file was deleted.

39 changes: 29 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
node_modules/
npm-debug.log
yarn-error.log
.idea/
docs/.vuepress/.dist/
docs/.vuepress/.cache/
docs/.vuepress/.temp/
dist/
dist-modern/
Icon?
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

Icon**

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
6 changes: 0 additions & 6 deletions .lintstagedrc.json

This file was deleted.

1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

82 changes: 44 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# vue-tel-input

International Telephone Input with Vue.

[![](https://img.shields.io/npm/dt/vue-tel-input.svg)](https://www.npmjs.com/package/vue-tel-input) [![](https://img.shields.io/github/stars/iamstevendao/vue-tel-input.svg)](https://github.com/iamstevendao/vue-tel-input)
Expand All @@ -12,9 +13,10 @@ International Telephone Input with Vue.
[Visit the website](https://iamstevendao.github.io/vue-tel-input/)

## Getting started

- Install the plugin:

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

Expand All @@ -39,7 +41,9 @@ International Telephone Input with Vue.
```

## Installation

### npm

```bash
npm install vue-tel-input
```
Expand All @@ -53,6 +57,7 @@ import 'vue-tel-input/dist/vue-tel-input.css'

Vue.use(VueTelInput, options) // Define default global options here (optional)
```

> View all available options in [Props](https://iamstevendao.github.io/vue-tel-input/documentation/props.html).
Or use the component directly:
Expand Down Expand Up @@ -82,56 +87,57 @@ export default {
<link rel="stylesheet" href="https://unpkg.com/vue-tel-input/dist/vue-tel-input.css">
```

** If Vue is detected in the Page, the plugin is installed automatically.**
**If Vue is detected in the Page, the plugin is installed automatically.**

** Otherwise, manually install the plugin into Vue:

```js
Vue.use(window['vue-tel-input']);
```

### Use as a custom field of [vue-form-generator](https://github.com/vue-generators/vue-form-generator)
## Changelog

- Add a component using `vue-form-generator`'s `abstractField` mixin
```html
<!-- tel-input.vue -->
<template>
<vue-tel-input v-model="value"></vue-tel-input>
</template>

<script>
import { abstractField } from 'vue-form-generator';
export default {
name: 'TelephoneInput',
mixins: [abstractField],
};
</script>
```
[Go to Github Releases](https://github.com/iamstevendao/vue-tel-input/releases)

- Register the new field as a global component
```js
import Vue from 'vue';
import TelInput from '<path>/tel-input.vue';
## Development

Vue.component('field-tel-input', TelInput);
```
Clone the project

- Now it can be used as `tel-input` in schema of `vue-form-generator`
```js
var schema: {
fields: [{
type: "tel-input",
label: "Awesome (tel input)",
model: "telephone"
}]
};
```
Read more on `vue-form-generator`'s [instruction page](https://icebob.gitbooks.io/vueformgenerator/content/fields/custom_fields.html)
```bash
git clone https://github.com/iamstevendao/vue-tel-input.git
```

Go to the project directory & checkout the `next` branch

## Changelog
[Go to Github Releases](https://github.com/iamstevendao/vue-tel-input/releases)
```bash
cd vue-tel-input
git checkout next origin/next
```

Install dependencies

```bash
npm install
```

Build the project

```bash
npm run build
```

Start the es build example

```bash
npm run dev
```

Start the browser build example

```bash
npx http-server -p 8080
# 127.0.0.1:8080/examples/browser.html
```

## License

Expand Down
5 changes: 0 additions & 5 deletions babel.config.js

This file was deleted.

31 changes: 0 additions & 31 deletions circle.yml

This file was deleted.

24 changes: 0 additions & 24 deletions demo.sh

This file was deleted.

72 changes: 0 additions & 72 deletions docs/.vuepress/config.js

This file was deleted.

8 changes: 0 additions & 8 deletions docs/.vuepress/enhanceApp.js

This file was deleted.

Binary file removed docs/.vuepress/public/favicon-16x16.png
Binary file not shown.
Binary file removed docs/.vuepress/public/favicon-32x32.png
Binary file not shown.
Binary file removed docs/.vuepress/public/hero.png
Binary file not shown.
Loading

0 comments on commit 52f6f2a

Please sign in to comment.