Skip to content

Commit

Permalink
refactor: to ts and build
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrum committed Jul 7, 2021
1 parent 5296c3f commit c484b6a
Show file tree
Hide file tree
Showing 29 changed files with 5,780 additions and 12,945 deletions.
4 changes: 4 additions & 0 deletions .c8rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"reporter": ["lcov", "text"],
"extension": [".ts"]
}
14 changes: 14 additions & 0 deletions .clintonrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"ignores": [
"test/**",
"tmp/**",
"lib/**",
"*.{html,jpg}"
],
"rules": {
"pkg-main": "off",
"xo": "off",
"use-travis": "off",
"ava": "off"
}
}
8 changes: 3 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
quote_type = single
trim_trailing_whitespace = true
insert_final_newline = true

[*.{json,yml,jade,pss,css,html,js}]
[{*.json,*.yaml,*.yml,*.jade,*.pss,*.css,*.js,*.md,.*,*.ts}]
indent_size = 2

[changelog.md]
insert_final_newline = false

[*.html]
[{changelog.md,.*}]
insert_final_newline = false

[*.md]
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Actions Status
on:
pull_request:
types: [opened, synchronize]
branches:
- master
env:
CI: true

jobs:
run:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node: [12, 14, 16]
os: [ubuntu-latest]

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Set Node.js version
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Install npm dependencies
run: npm ci

- name: Run tests
run: npm run test

- name: Run Coveralls
uses: coverallsapp/github-action@master
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
node_modules
lib
coverage
.nyc_output
npm-debug.log
dist
7 changes: 7 additions & 0 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"hooks": {
"pre-push": "npm t",
"pre-commit": "clinton && lint-staged",
"commit-msg": "commitlint --extends=@commitlint/config-angular -e"
}
}
3 changes: 3 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"src/*.ts": "tslint -c tslint.json"
}
2 changes: 0 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
node_modules
src
.gitignore
.travis.yml
coverage
.nyc_output
npm-debug.log
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

18 changes: 0 additions & 18 deletions appveyor.yml

This file was deleted.

7 changes: 7 additions & 0 deletions ava.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const config = {
verbose: true,
extensions: ['ts'],
require: ['esm', 'esbuild-register', './test/helpers/setup-browser-env.js']
};

export default config;
5 changes: 5 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Directive } from 'vue';

declare const RestrictedInputDirective: Directive;

export { RestrictedInputDirective as VueRestrictedInputDirective };
1 change: 1 addition & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c484b6a

Please sign in to comment.