Skip to content

Commit 7fb7d08

Browse files
authored
chore: minor cleanup (#109)
remove unused package name npm scripts with ':' instead of '-' stop emiting on compile, just use the bundled files for running the code use 'dist' folder instead of 'bundle'
1 parent e01ba10 commit 7fb7d08

File tree

6 files changed

+14
-48
lines changed

6 files changed

+14
-48
lines changed

.github/workflows/format.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
- name: Install Dependencies
1616
run: yarn --immutable
1717
- name: Format
18-
run: yarn format-check
18+
run: yarn format:check

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
- name: Install Dependencies
1616
run: yarn --immutable
1717
- name: Lint
18-
run: yarn lint-check
18+
run: yarn lint:check

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ attribute.
8686
there is no need to invoke this manually.
8787
- `yarn compile` -> Runs the typescript compiler against the typescript
8888
codebase. Displays any errors if they occur.
89-
- `yarn compile-watch` -> Runs the typescript compiler every time you make
89+
- `yarn compile:watch` -> Runs the typescript compiler every time you make
9090
changes to a file. It is good to open this in another terminal while
9191
developing to spot typescript issues.
9292
- `yarn dev` -> This should be used for running the code while developing. It
@@ -95,11 +95,11 @@ attribute.
9595
and restarts the code whenever changes are detected. This enables a quick
9696
feedback loop.
9797
- `yarn format` -> Formats the code using prettier.
98-
- `yarn format-check` -> Checks for formatting errors using prettier. This is
98+
- `yarn format:check` -> Checks for formatting errors using prettier. This is
9999
typically only invoked by the CI/CD pipeline.
100100
- `yarn lint` -> Lints the code using eslint. Fixes problems that are
101101
auto-fixable and reports the rest of them to you.
102-
- `yarn lint-check` -> Checks for linting errors using eslint. This is typically
102+
- `yarn lint:check` -> Checks for linting errors using eslint. This is typically
103103
only invoked by the CI/CD pipeline.
104104
- `yarn start` -> Runs the code. This only works if the code was bundled before ;).
105105
- `yarn test` -> Tests your codebase. Basic tests are created for both major

package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,15 @@
2828
"author": "Pierre Dahmani <hi@pierre-dev.com>",
2929
"license": "MIT",
3030
"scripts": {
31-
"bundle": "esbuild src/index.ts --outdir=bundle --sourcemap --bundle --platform=node --target=node20.10.0",
32-
"clean": "rimraf dist",
31+
"bundle": "rimraf dist && esbuild --outdir=dist --sourcemap --bundle --platform=node --target=node20.10.0 ./src/index.ts",
3332
"compile": "tsc",
34-
"compile-watch": "tsc -w",
33+
"compile:watch": "tsc -w",
3534
"dev": "nodemon --watch src --watch test --ext ts,json --exec 'yarn bundle && yarn start'",
3635
"format": "prettier . --write",
37-
"format-check": "prettier . --check",
36+
"format:check": "prettier . --check",
3837
"lint": "eslint . --fix",
39-
"lint-check": "eslint .",
40-
"start": "node --enable-source-maps ./bundle/index.js",
38+
"lint:check": "eslint .",
39+
"start": "node --enable-source-maps ./dist/index.js",
4140
"test": "jest --runInBand ."
4241
},
4342
"devDependencies": {
@@ -53,7 +52,6 @@
5352
"esbuild": "0.19.12",
5453
"eslint": "8.57.0",
5554
"eslint-config-prettier": "9.1.0",
56-
"glob": "10.3.15",
5755
"jest": "29.7.0",
5856
"nodemon": "3.1.0",
5957
"prettier": "3.2.5",

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "@tsconfig/node20/tsconfig.json",
33
"compilerOptions": {
4+
"noEmit": true,
45
"outDir": "dist",
56
"baseUrl": ".",
67
"allowUnusedLabels": false,
@@ -15,5 +16,5 @@
1516
"resolveJsonModule": true
1617
},
1718
"include": ["src", "test"],
18-
"exclude": ["dist", "bundle", "node_modules"]
19+
"exclude": ["dist", "node_modules"]
1920
}

yarn.lock

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3499,21 +3499,6 @@ __metadata:
34993499
languageName: node
35003500
linkType: hard
35013501

3502-
"glob@npm:10.3.15":
3503-
version: 10.3.15
3504-
resolution: "glob@npm:10.3.15"
3505-
dependencies:
3506-
foreground-child: "npm:^3.1.0"
3507-
jackspeak: "npm:^2.3.6"
3508-
minimatch: "npm:^9.0.1"
3509-
minipass: "npm:^7.0.4"
3510-
path-scurry: "npm:^1.11.0"
3511-
bin:
3512-
glob: dist/esm/bin.mjs
3513-
checksum: b2b1c74309979b34fd6010afb50418a12525def32f1d3758d5827fc75d6143fc3ee5d1f3180a43111f6386c9e297c314f208d9d09955a6c6b69f22e92ee97635
3514-
languageName: node
3515-
linkType: hard
3516-
35173502
"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7":
35183503
version: 10.3.10
35193504
resolution: "glob@npm:10.3.10"
@@ -3896,7 +3881,7 @@ __metadata:
38963881
languageName: node
38973882
linkType: hard
38983883

3899-
"jackspeak@npm:^2.3.5, jackspeak@npm:^2.3.6":
3884+
"jackspeak@npm:^2.3.5":
39003885
version: 2.3.6
39013886
resolution: "jackspeak@npm:2.3.6"
39023887
dependencies:
@@ -4512,13 +4497,6 @@ __metadata:
45124497
languageName: node
45134498
linkType: hard
45144499

4515-
"lru-cache@npm:^10.2.0":
4516-
version: 10.2.0
4517-
resolution: "lru-cache@npm:10.2.0"
4518-
checksum: 502ec42c3309c0eae1ce41afca471f831c278566d45a5273a0c51102dee31e0e250a62fa9029c3370988df33a14188a38e682c16143b794de78668de3643e302
4519-
languageName: node
4520-
linkType: hard
4521-
45224500
"lru-cache@npm:^5.1.1":
45234501
version: 5.1.1
45244502
resolution: "lru-cache@npm:5.1.1"
@@ -4690,7 +4668,7 @@ __metadata:
46904668
languageName: node
46914669
linkType: hard
46924670

4693-
"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4":
4671+
"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3":
46944672
version: 7.0.4
46954673
resolution: "minipass@npm:7.0.4"
46964674
checksum: e864bd02ceb5e0707696d58f7ce3a0b89233f0d686ef0d447a66db705c0846a8dc6f34865cd85256c1472ff623665f616b90b8ff58058b2ad996c5de747d2d18
@@ -4787,7 +4765,6 @@ __metadata:
47874765
esbuild: "npm:0.19.12"
47884766
eslint: "npm:8.57.0"
47894767
eslint-config-prettier: "npm:9.1.0"
4790-
glob: "npm:10.3.15"
47914768
jest: "npm:29.7.0"
47924769
nodemon: "npm:3.1.0"
47934770
prettier: "npm:3.2.5"
@@ -5000,16 +4977,6 @@ __metadata:
50004977
languageName: node
50014978
linkType: hard
50024979

5003-
"path-scurry@npm:^1.11.0":
5004-
version: 1.11.1
5005-
resolution: "path-scurry@npm:1.11.1"
5006-
dependencies:
5007-
lru-cache: "npm:^10.2.0"
5008-
minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0"
5009-
checksum: 5e8845c159261adda6f09814d7725683257fcc85a18f329880ab4d7cc1d12830967eae5d5894e453f341710d5484b8fdbbd4d75181b4d6e1eb2f4dc7aeadc434
5010-
languageName: node
5011-
linkType: hard
5012-
50134980
"path-type@npm:^4.0.0":
50144981
version: 4.0.0
50154982
resolution: "path-type@npm:4.0.0"

0 commit comments

Comments
 (0)