Skip to content

Commit 5caa829

Browse files
authored
Initial commit
0 parents  commit 5caa829

11 files changed

Lines changed: 9072 additions & 0 deletions

File tree

.eslintrc.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended"
9+
],
10+
"parser": "@typescript-eslint/parser",
11+
"parserOptions": {
12+
"ecmaVersion": "latest",
13+
"sourceType": "module"
14+
},
15+
"plugins": [
16+
"@typescript-eslint"
17+
],
18+
"rules": {
19+
}
20+
}

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- "**.md"
7+
push:
8+
paths-ignore:
9+
- "**.md"
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
node: [ '16' ]
16+
name: 🔨 Build 🧪 Test 🧹 Lint
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- name: 🟩 Setup Node.js 16.x
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: ${{ matrix.node }}
26+
cache: npm
27+
28+
- name: 🟢 Install node modules
29+
run: npm ci
30+
31+
- name: 🔨 Build
32+
run: npm run build
33+
34+
- name: 🧪 Test
35+
run: npm run test
36+
37+
- name: 🧹 Lint Demo
38+
run: npm run lint
39+
40+
- name: 💾 Archive artifacts
41+
uses: actions/upload-artifact@v2
42+
with:
43+
name: dist
44+
path: dist/
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ main ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ main ]
20+
paths-ignore:
21+
- '**/*.md'
22+
- '**/*.txt'
23+
schedule:
24+
- cron: '40 23 * * 1'
25+
26+
jobs:
27+
analyze:
28+
name: Analyze
29+
runs-on: ubuntu-latest
30+
permissions:
31+
actions: read
32+
contents: read
33+
security-events: write
34+
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
language: [ 'typescript' ]
39+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
40+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
41+
42+
steps:
43+
- name: Checkout repository
44+
uses: actions/checkout@v2
45+
46+
# Initializes the CodeQL tools for scanning.
47+
- name: Initialize CodeQL
48+
uses: github/codeql-action/init@v1
49+
with:
50+
languages: ${{ matrix.language }}
51+
# If you wish to specify custom queries, you can do so here or in a config file.
52+
# By default, queries listed here will override any specified in a config file.
53+
# Prefix the list here with "+" to use these queries and those in the config file.
54+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
55+
56+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
57+
# If this step fails, then you should remove it and run the build manually (see below)
58+
- name: Autobuild
59+
uses: github/codeql-action/autobuild@v1
60+
61+
# ℹ️ Command-line programs to run using the OS shell.
62+
# 📚 https://git.io/JvXDl
63+
64+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
65+
# and modify them (or add more) to build your code if your project
66+
# uses a compiled language
67+
68+
#- run: |
69+
# make bootstrap
70+
# make release
71+
72+
- name: Perform CodeQL Analysis
73+
uses: github/codeql-action/analyze@v1

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# TypeScript Node Template
2+
3+
Template for creating a TypeScript Node.js project.
4+
5+
## 🔨 Build
6+
```
7+
npm run build
8+
```
9+
10+
## 🧪 Test
11+
```
12+
npm test
13+
```
14+
15+
## 🏃 Run
16+
```
17+
npm start
18+
```
19+
20+
## 🧹 Lint
21+
```
22+
npm lint
23+
```

jest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
preset: 'ts-jest',
3+
testEnvironment: 'node'
4+
}

0 commit comments

Comments
 (0)