Skip to content

Commit

Permalink
fix: 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 5c0a268
Show file tree
Hide file tree
Showing 5 changed files with 4,516 additions and 85 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: yarn run release
21 changes: 21 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"branches": [
"main"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
"@semantic-release/npm",
"@semantic-release/github"
]
}
54 changes: 25 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# vue3-enter-to-tab
# `vue3-enter-to-tab` composable

[![npm package][npm-img]][npm-url]
[![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 3 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
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
],
"scripts": {
"build": "tsc --project tsconfig.json",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --noEmit",
"release": "semantic-release"
},
"repository": {
"type": "git",
Expand All @@ -29,8 +30,12 @@
},
"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",
"conventional-changelog-conventionalcommits": "^6.1.0",
"prettier": "3.0.3",
"semantic-release": "^22.0.5",
"ts-node": "10.9.1",
"typescript": "5.2.2"
},
Expand Down
Loading

0 comments on commit 5c0a268

Please sign in to comment.