diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ba22191 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: ci + +on: + push: + pull_request: + merge_group: + workflow_dispatch: + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 # v4 + - uses: actions/setup-node@v3 # v3 + with: + node-version-file: '.nvmrc' + cache: 'yarn' + + - name: Install dependencies 📦 + run: yarn install --immutable + - name: Run typecheck + run: yarn run typecheck + - name: Run build + run: yarn run build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..fe4466c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Release +on: + push: + branches: [main] + +permissions: + contents: read # for checkout + +jobs: + release: + name: Release + environment: + name: production + runs-on: ubuntu-latest + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for npm provenance + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: "lts/*" + cache: 'yarn' + - name: Install dependencies + run: yarn install --immutable + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release diff --git a/.gitignore b/.gitignore index 783c7b9..87eca4e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +lib + # Created by https://www.toptal.com/developers/gitignore/api/yarn,Node # Edit at https://www.toptal.com/developers/gitignore?templates=yarn,Node diff --git a/README.md b/README.md index 45c620b..82b010b 100644 --- a/README.md +++ b/README.md @@ -2,61 +2,33 @@ [![npm package][npm-img]][npm-url] [![Build Status][build-img]][build-url] -[![Downloads][downloads-img]][downloads-url] -[![Issues][issues-img]][issues-url] -[![Code Coverage][codecov-img]][codecov-url] -[![Commitizen Friendly][commitizen-img]][commitizen-url] -[![Semantic Release][semantic-release-img]][semantic-release-url] -> My awesome module +TODO description + +## Credits + +https://github.com/ajomuch92/vue-enter-to-tab ## Install +NPM: + ```bash -npm install vue3-enter-to-tab +npm i --save vue3-enter-to-tab +yarn add vue3-enter-to-tab ``` ## Usage ```ts -import { myPackage } from 'vue3-enter-to-tab'; +import { useEnterToTab } from 'vue3-enter-to-tab' -myPackage('hello'); +myPackage('hello') //=> 'hello from my package' ``` -## API - -### myPackage(input, options?) - -#### input - -Type: `string` - -Lorem ipsum. - -#### options - -Type: `object` - -##### postfix +**Note**: This directive doesn't work on textarea elements. -Type: `string` -Default: `rainbows` +Any contribution is welcome. Visit my web page [here](https://www.ajomuch92.site/#/). -Lorem ipsum. -[build-img]:https://github.com/l3d00m/vue3-enter-to-tab/actions/workflows/release.yml/badge.svg -[build-url]:https://github.com/l3d00m/vue3-enter-to-tab/actions/workflows/release.yml -[downloads-img]:https://img.shields.io/npm/dt/vue3-enter-to-tab -[downloads-url]:https://www.npmtrends.com/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 -[issues-img]:https://img.shields.io/github/issues/l3d00m/vue3-enter-to-tab -[issues-url]:https://github.com/l3d00m/vue3-enter-to-tab/issues -[codecov-img]:https://codecov.io/gh/l3d00m/vue3-enter-to-tab/branch/main/graph/badge.svg -[codecov-url]:https://codecov.io/gh/l3d00m/vue3-enter-to-tab -[semantic-release-img]:https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg -[semantic-release-url]:https://github.com/semantic-release/semantic-release -[commitizen-img]:https://img.shields.io/badge/commitizen-friendly-brightgreen.svg -[commitizen-url]:http://commitizen.github.io/cz-cli/ diff --git a/package.json b/package.json index aca7647..436e6a2 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "lib/**/*" ], "scripts": { - "build": "tsc --project tsconfig.build.json", + "build": "tsc --project tsconfig.json", "typecheck": "tsc --noEmit" }, "repository": { diff --git a/yarn.lock b/yarn.lock index 36ff449..3bc450e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -421,11 +421,11 @@ __metadata: "typescript@patch:typescript@5.2.2#~builtin": version: 5.2.2 - resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=14eedb" + resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=f3b441" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 07106822b4305de3f22835cbba949a2b35451cad50888759b6818421290ff95d522b38ef7919e70fb381c5fe9c1c643d7dea22c8b31652a717ddbd57b7f4d554 + checksum: 0f4da2f15e6f1245e49db15801dbee52f2bbfb267e1c39225afdab5afee1a72839cd86000e65ee9d7e4dfaff12239d28beaf5ee431357fcced15fb08583d72ca languageName: node linkType: hard