Skip to content

Commit

Permalink
chore: added git workflow and fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
TouchSek committed Mar 13, 2021
1 parent 294fa01 commit 875e9e8
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patreon: chantouch
32 changes: 32 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: 2
updates:
# Fetch and update latest `npm` packages
- package-ecosystem: npm
directory: '/'
schedule:
interval: daily
time: '00:00'
open-pull-requests-limit: 10
reviewers:
- chantouch
assignees:
- chantouch
commit-message:
prefix: fix
prefix-development: chore
include: scope
# Fetch and update latest `github-actions` pkgs
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: daily
time: '00:00'
open-pull-requests-limit: 10
reviewers:
- chantouch
assignees:
- chantouch
commit-message:
prefix: fix
prefix-development: chore
include: scope
19 changes: 19 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Mark stale issues and pull requests

on:
schedule:
- cron: "30 1 * * *"

jobs:
stale:

runs-on: ubuntu-latest

steps:
- uses: actions/stale@v3.0.16
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Node.js Package Lint And Test

on:
push:
branches:
- "*"
- "!master"
pull_request:
branches:
- "*"

jobs:
lint-and-test:
name: Test on node ${{ matrix.node-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [12, 13]
os: [ubuntu-latest, macOS-latest]

steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 1
- uses: actions/setup-node@v2.1.4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm ci
- run: npm run lint
- run: npm run build --if-present
- run: npm test
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "v-timers",
"version": "0.0.1-alpha.4",
"version": "0.0.2",
"license": "MIT",
"description": "Mixin to manage your intervals in Vue.js",
"main": "dist/v-timers.umd.js",
Expand All @@ -14,12 +14,13 @@
},
"keywords": [
"vue-timers",
"vue-timer",
"v-timers",
"v-timer",
"timers"
],
"files": [
"nuxt",
"src",
"types",
"dist"
],
Expand Down
1 change: 1 addition & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import _Vue from "vue";
import './vue'

export declare class VTimers {
start(name: string): void;
Expand Down
17 changes: 17 additions & 0 deletions types/vue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,26 @@
*/

import { VTimers } from './';
import Vue from "vue";

interface ITimers {
name: string
callback: Function | string
autoStart: boolean
repead: boolean
immediate: boolean
time: number
isSwitchTab: boolean
}

declare module 'vue/types/vue' {
interface Vue {
$timer: VTimers;
}
}

declare module 'vue/types/options' {
interface ComponentOptions<V extends Vue> {
timers?: {[key: string]: VTimers}
}
}

0 comments on commit 875e9e8

Please sign in to comment.