Skip to content

Commit

Permalink
feat!: fix broken commit msg parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
l3d00m committed Oct 6, 2023
1 parent ebe3a7c commit 9903be2
Show file tree
Hide file tree
Showing 4 changed files with 806 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release --branches main
run: npx semantic-release
52 changes: 24 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Release](https://github.com/l3d00m/vue3-enter-to-tab/actions/workflows/release.yml/badge.svg)](https://github.com/l3d00m/vue3-enter-to-tab/actions/workflows/release.yml)
[![ci](https://github.com/l3d00m/vue3-enter-to-tab/actions/workflows/ci.yml/badge.svg)](https://github.com/l3d00m/vue3-enter-to-tab/actions/workflows/ci.yml)

A Vue composable to convert the enter key to tab key. Especially useful when using numpads for inputting forms.
A Vue composable to convert the enter key to tab key on form inputs. Especially useful when using numpads for inputting forms.

This is a fork of [ajomuch92/vue-enter-to-tab](https://github.com/ajomuch92/vue-enter-to-tab) and has been converted from a mixin to a Vue3 composable. It also features new options.

Expand All @@ -21,8 +21,6 @@ yarn add vue3-enter-to-tab

## Usage

**Note**: This doesn't work on textarea elements.

### Minimal example with composition API

```vue
Expand All @@ -41,27 +39,6 @@ useEnterToTab(form)
</script>
```

### Minimal example with options API

The code has not been tested yet and it is recommended to use the composition API instead.

```vue
<template>
<div ref="form"></div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue'
import { useEnterToTab } from 'vue3-enter-to-tab'
export default defineComponent({
setup() {
useEnterToTab(this.$refs.form)
},
})
</script>
```

### Full example

See documentation below.
Expand All @@ -87,6 +64,27 @@ isEnterToTabEnabled.value = true
</script>
```

### Minimal example with options API

The code has not been tested yet and it is recommended to use the composition API instead.

```vue
<template>
<div ref="form"></div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue'
import { useEnterToTab } from 'vue3-enter-to-tab'
export default defineComponent({
setup() {
useEnterToTab(this.$refs.form)
},
})
</script>
```

## API: `useEnterToTab(element, options?)`

### Input `element`
Expand Down Expand Up @@ -128,7 +126,5 @@ Directive to use in those inputs you want to avoid use enter as tab. Inputs with

Ref to read and change the status of the function.

```vue
[npm-img]: https://img.shields.io/npm/v/vue3-enter-to-tab [npm-url]:
https://www.npmjs.com/package/vue3-enter-to-tab
```
[npm-img]: https://img.shields.io/npm/v/vue3-enter-to-tab
[npm-url]: https://www.npmjs.com/package/vue3-enter-to-tab
21 changes: 21 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
},
"homepage": "https://github.com/l3d00m/vue3-enter-to-tab#readme",
"devDependencies": {
"@semantic-release/commit-analyzer": "11.0.0",
"@semantic-release/release-notes-generator": "12.0.0",
"@types/node": "20.8.2",
"prettier": "3.0.3",
"ts-node": "10.9.1",
Expand All @@ -38,5 +40,24 @@
"dependencies": {
"@vueuse/core": ">9.x",
"vue": ">=3.3 <4"
},
"release": {
"branches": [
"main"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
]
]
}
}
Loading

0 comments on commit 9903be2

Please sign in to comment.