Skip to content

Commit 3b5030a

Browse files
committed
feat: nodemon, package scripts
1 parent be5795b commit 3b5030a

File tree

8 files changed

+168
-4
lines changed

8 files changed

+168
-4
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This auto assigns the following teams to pull requests
2+
* @krauters/core

.github/workflows/node-publish.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Node Publish
2+
run-name: Node Publish [${{ github.ref_name }}] triggered by [${{ github.event_name }}/${{ github.actor }}]
3+
4+
on:
5+
release:
6+
types: published
7+
push:
8+
branches: '*'
9+
workflow_dispatch:
10+
11+
jobs:
12+
publish:
13+
uses: krauters/shared-workflows/.github/workflows/node-publish.yaml@main
14+
secrets:
15+
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
16+
with:
17+
dry_run: ${{ github.event_name != 'release' }}

.github/workflows/node-release.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Node Release
2+
run-name: Node Release [${{ github.ref_name }}] triggered by [${{ github.event_name }}/${{ github.actor }}]
3+
on:
4+
push:
5+
branches: '*'
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
uses: krauters/shared-workflows/.github/workflows/node-release.yaml@main
11+
secrets:
12+
GH_TOKEN_RELEASES: ${{ secrets.GH_TOKEN_RELEASES }}

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
registry=https://registry.npmjs.org/
2+
//registry.npmjs.org/:_authToken=${NPM_TOKEN}

package-lock.json

Lines changed: 117 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,25 @@
77
"chai": "^5.1.1",
88
"husky": "^9.1.1",
99
"mocha": "^10.7.0",
10+
"nodemon": "^3.1.4",
1011
"sinon": "^18.0.0",
1112
"ts-node": "^10.9.2",
1213
"typescript": "^5.5.3"
1314
},
1415
"name": "@krauters/typescript-core",
1516
"description": "A TypeScript Repository that stands as a starting point for all other TypeScript repositories.",
16-
"version": "0.0.0",
17-
"main": "index.ts",
17+
"version": "0.2.0",
18+
"main": "app.ts",
1819
"type": "module",
1920
"scripts": {
21+
"build": "npm run ts-node -- ./src/app.ts",
22+
"example-1": "npm run ts-node -- ./example/1.ts",
2023
"mocha": "c8 --config test/c8.config.json mocha --config test/.mocharc.json",
2124
"prepare": "husky || true",
2225
"readme": "node scripts/readme.js",
26+
"start": "nodemon --inspect -e ts -w ./src -x npm run build",
2327
"test": "npm run mocha",
28+
"ts-node": "node --no-warnings --loader ts-node/esm/transpile-only",
2429
"update-all": "npx npm-check-updates -u && npm install"
2530
},
2631
"keywords": [

src/app.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.info('Hello world!')

tsconfig.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313
"target": "ESNext", // Latest ECMAScript target
1414
"types": ["mocha", "node"] // Type definitions for Mocha and Node
1515
},
16-
"exclude": ["node_modules"], // Exclude node_modules directory
17-
"include": ["src/**/*.{ts,tsx}", "test/**/*.{ts,tsx}"] // Include source and test files
16+
"exclude": ["node_modules"],
17+
"include": [
18+
"*.ts",
19+
"examples/**/*.ts",
20+
"examples/**/*.tsx",
21+
"src/**/*.ts",
22+
"src/**/*.tsx",
23+
"test/**/*.ts",
24+
"test/**/*.tsx",
25+
],
1826
}

0 commit comments

Comments
 (0)