Skip to content

Commit 2bf9816

Browse files
committed
Initial
0 parents  commit 2bf9816

17 files changed

+6953
-0
lines changed

.github/workflows/publish.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Publish to NPM
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
permissions:
12+
contents: read
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Node.js v20
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 20.x
22+
registry-url: "https://registry.npmjs.org"
23+
24+
- name: Cache node modules
25+
uses: actions/cache@v4
26+
with:
27+
path: ~/.npm
28+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
29+
restore-keys: |
30+
${{ runner.os }}-node-
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Build library
36+
run: npm run build
37+
38+
- name: Run tests
39+
run: npm test --if-present
40+
41+
- name: Publish to NPM
42+
run: npm publish
43+
env:
44+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/dist
2+
/tmp
3+
/out-tsc
4+
/node_modules
5+
/**/node_modules
6+
/.idea
7+
.project
8+
.classpath
9+
.c9/
10+
*.launch
11+
.settings/
12+
*.sublime-workspace
13+
.vscode/*
14+
!.vscode/settings.json
15+
!.vscode/tasks.json
16+
!.vscode/launch.json
17+
!.vscode/extensions.json
18+
/connect.lock
19+
/coverage/full
20+
/coverage/report/*.json
21+
/coverage/report.json
22+
/libpeerconnection.log
23+
npm-debug.log
24+
yarn-error.log
25+
testem.log
26+
/typings
27+
.cache
28+
.nx/cache
29+
.DS_Store
30+
Thumbs.db
31+
*ormlogs.log
32+
*combined.log
33+
*.env
34+
*.tmp.ts
35+
*lint-report.json

jest.config.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = {
2+
preset: "ts-jest",
3+
testEnvironment: "node",
4+
moduleFileExtensions: ["js", "json", "ts"],
5+
rootDir: "src",
6+
testRegex: 'src/.*\\.spec\\.ts$',
7+
transform: {
8+
"^.+\\.(t|j)s$": "ts-jest",
9+
},
10+
transformIgnorePatterns: ["<rootDir>/node_modules/"],
11+
clearMocks: true,
12+
moduleNameMapper: {
13+
'^src/(.*)$': '<rootDir>/src/$1',
14+
},
15+
collectCoverageFrom: [
16+
'src/**/*.ts',
17+
'!src/**/*.spec.ts',
18+
],
19+
};

0 commit comments

Comments
 (0)