Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Node.js CI

on:
push:
branches:
- master

pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18]
name: Node.js v${{ matrix.node-version }}
steps:
- uses: actions/checkout@v3
- name: Setup Node.js v${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install --frozen-lockfile

- name: Analyze
run: |
yarn lint
yarn test
yarn tsc

- run: yarn cover
- run: yarn build
- run: yarn report-coverage
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules/
.DS_Store
coverage/
dist/
.eslintcache
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
dist/
coverage/
.next/
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

6 changes: 0 additions & 6 deletions examples/endpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ function makeEndpoints(app, HLTV) {
res.json(matches)
})

app.get('/matches/:eventId', async (req, res) => {
const { eventId } = req.params
const matches = await HLTV.getMatches(eventId)
res.json(matches)
})

app.get('/results/:matchId/stats', async (req, res) => {
const { matchId } = req.params
const match = await HLTV.getMatchById(matchId)
Expand Down
6 changes: 3 additions & 3 deletions examples/with-babel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
To test the module, on the `ROOT` level, first build the project in watch mode to create `/dist` folder:

```sh
$ npm run build:w
$ yarn build:w
```

and than run:
and than run in another terminal:

```sh
$ npm start
$ yarn workspace with-babel start
```
8 changes: 4 additions & 4 deletions examples/with-babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"start": "babel-node index.js"
},
"dependencies": {
"express": "^4.16.2"
"express": "^4.18.2"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/node": "^7.2.2",
"@babel/preset-env": "^7.4.4"
"@babel/core": "^7.20.2",
"@babel/node": "^7.20.2",
"@babel/preset-env": "^7.20.2"
}
}
Loading