Skip to content

Commit 3567444

Browse files
feat: Migrate to make
1 parent 8220789 commit 3567444

File tree

8 files changed

+66
-226
lines changed

8 files changed

+66
-226
lines changed

Makefile

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1-
.PHONE: pretty
1+
.PHONY: default build clean docs pretty lint test run
2+
3+
default: clean build
4+
5+
build: output
6+
7+
clean:
8+
rm -rf ./output tsconfig.tsbuildinfo
9+
10+
docs:
11+
podman run --rm --volume ${PWD}:/docs docker.io/squidfunk/mkdocs-material build --site-dir=public
12+
213
pretty:
314
yarn biome check --write --no-errors-on-unmatched
15+
16+
lint:
17+
yarn biome check .
18+
yarn tsc --noEmit
19+
20+
test: clean build
21+
node --experimental-vm-modules $(shell yarn bin jest) --coverage source
22+
23+
run: clean build
24+
node ./output/main.js
25+
26+
27+
output:
28+
yarn tsc
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## postversion
2+
3+
- Project: `node-scripts-docs`
4+
- Source:
5+
6+
```shell
7+
git push
8+
```
9+
10+
- Description:
11+
12+
_documentation pending_

docs/reference/Repository Scripts/.prepack.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- Source:
55

66
```shell
7-
yarn build
7+
make
88
```
99

1010
- Description:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## preversion
2+
3+
- Project: `node-scripts-docs`
4+
- Source:
5+
6+
```shell
7+
make lint test
8+
```
9+
10+
- Description:
11+
12+
_documentation pending_
Lines changed: 6 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -1,157 +1,41 @@
11
# Full reference
22

3-
## build
3+
## postversion
44

55
- Project: `node-scripts-docs`
66
- Source:
77

88
```shell
9-
tsc
10-
```
11-
12-
- Description:
13-
14-
Build the TypeScript sources.
15-
16-
## docs:build
17-
18-
- Project: `node-scripts-docs`
19-
- Source:
20-
21-
```shell
22-
podman run --rm -it -p 8000:8000 -v ${PWD}:/docs docker.io/squidfunk/mkdocs-material build --site-dir=public
23-
```
24-
25-
- Description:
26-
27-
Build the documentation website locally.
28-
29-
## docs:scripts
30-
31-
- Project: `node-scripts-docs`
32-
- Source:
33-
34-
```shell
35-
yarn nsd-debug
36-
```
37-
38-
- Description:
39-
40-
Rebuilds the `node-scripts-docs` documentation for this project itself.
41-
42-
## docs:serve
43-
44-
- Project: `node-scripts-docs`
45-
- Source:
46-
47-
```shell
48-
podman run --rm -it -p 8000:8000 -v ${PWD}:/docs docker.io/squidfunk/mkdocs-material
49-
```
50-
51-
- Description:
52-
53-
Runs the mkdocs-material development server.
54-
55-
## npm:publish
56-
57-
- Project: `node-scripts-docs`
58-
- Source:
59-
60-
```shell
61-
npm publish
62-
```
63-
64-
- Description:
65-
66-
Build the latest sources and then `npm publish` the current state.
67-
68-
## npm:publish:major
69-
70-
- Project: `node-scripts-docs`
71-
- Source:
72-
73-
```shell
74-
npm version major && npm publish
9+
git push
7510
```
7611

7712
- Description:
7813

7914
_documentation pending_
8015

81-
## npm:publish:minor
82-
83-
- Project: `node-scripts-docs`
84-
- Source:
85-
86-
```shell
87-
npm version minor && npm publish
88-
```
89-
90-
- Description:
91-
92-
_documentation pending_
93-
94-
## npm:publish:patch
95-
96-
- Project: `node-scripts-docs`
97-
- Source:
98-
99-
```shell
100-
npm version patch && npm publish
101-
```
102-
103-
- Description:
104-
105-
Publish a patch release to the npm registry.
106-
107-
## nsd-debug
108-
109-
- Project: `node-scripts-docs`
110-
- Source:
111-
112-
```shell
113-
yarn build && node output/node-scripts-docs.js
114-
```
115-
116-
- Description:
117-
118-
Build the latest sources and then use the build output to execute your command. Parameters are passed through by `yarn`.
119-
12016
## prepack
12117

12218
- Project: `node-scripts-docs`
12319
- Source:
12420

12521
```shell
126-
yarn build
22+
make
12723
```
12824

12925
- Description:
13026

13127
_documentation pending_
13228

133-
## test
29+
## preversion
13430

13531
- Project: `node-scripts-docs`
13632
- Source:
13733

13834
```shell
139-
node --experimental-vm-modules $(yarn bin jest)
35+
make lint test
14036
```
14137

14238
- Description:
14339

144-
Execute all Jest test suites.
145-
146-
## test:coverage
147-
148-
- Project: `node-scripts-docs`
149-
- Source:
150-
151-
```shell
152-
node --experimental-vm-modules $(yarn bin jest) --coverage
153-
```
154-
155-
- Description:
40+
_documentation pending_
15641

157-
Execute Jest test suites and calculate code coverage.

package.json

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,11 @@
1515
},
1616
"type": "module",
1717
"bin": {
18-
"nsd": "output/node-scripts-docs.js"
18+
"nsd": "output/main.js"
1919
},
2020
"scripts": {
21-
"build": "tsc",
22-
"docs:build": "podman run --rm -v ${PWD}:/docs docker.io/squidfunk/mkdocs-material build --site-dir=public",
23-
"docs:scripts": "yarn nsd-debug",
24-
"docs:serve": "podman run --rm -it -p 8000:8000 -v ${PWD}:/docs docker.io/squidfunk/mkdocs-material",
25-
"lint": "yarn run lint:all",
26-
"lint:all": "yarn run lint:biome && yarn run lint:tsc",
27-
"lint:biome": "biome check .",
28-
"lint:tsc": "tsc --noEmit",
29-
"nextversion": "./.scripts/manifest-version.cjs",
30-
"nsd-debug": "yarn build && node output/node-scripts-docs.js",
31-
"prepack": "yarn build",
32-
"test": "node --experimental-vm-modules $(yarn bin jest) source",
33-
"test:coverage": "node --experimental-vm-modules $(yarn bin jest) --coverage",
34-
"preversion": "yarn run lint && yarn run build && yarn run test",
21+
"prepack": "make",
22+
"preversion": "make lint test",
3523
"postversion": "git push"
3624
},
3725
"dependencies": {

package.json-scripts.json

Lines changed: 6 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -4,107 +4,26 @@
44
{
55
"manifestPath": "package.json",
66
"projectName": "node-scripts-docs",
7-
"scriptName": "build",
8-
"scriptCode": "tsc",
7+
"scriptName": "postversion",
8+
"scriptCode": "git push",
99
"isGlobal": false,
10-
"isRootManifest": true,
11-
"description": "Build the TypeScript sources."
12-
},
13-
{
14-
"manifestPath": "package.json",
15-
"projectName": "node-scripts-docs",
16-
"scriptName": "docs:build",
17-
"scriptCode": "podman run --rm -it -p 8000:8000 -v ${PWD}:/docs docker.io/squidfunk/mkdocs-material build --site-dir=public",
18-
"isGlobal": true,
19-
"isRootManifest": true,
20-
"description": "Build the documentation website locally."
21-
},
22-
{
23-
"manifestPath": "package.json",
24-
"projectName": "node-scripts-docs",
25-
"scriptName": "docs:scripts",
26-
"scriptCode": "yarn nsd-debug",
27-
"isGlobal": true,
28-
"isRootManifest": true,
29-
"description": "Rebuilds the `node-scripts-docs` documentation for this project itself."
30-
},
31-
{
32-
"manifestPath": "package.json",
33-
"projectName": "node-scripts-docs",
34-
"scriptName": "docs:serve",
35-
"scriptCode": "podman run --rm -it -p 8000:8000 -v ${PWD}:/docs docker.io/squidfunk/mkdocs-material",
36-
"isGlobal": true,
37-
"isRootManifest": true,
38-
"description": "Runs the mkdocs-material development server."
39-
},
40-
{
41-
"manifestPath": "package.json",
42-
"projectName": "node-scripts-docs",
43-
"scriptName": "npm:publish",
44-
"scriptCode": "npm publish",
45-
"isGlobal": true,
46-
"isRootManifest": true,
47-
"description": "Build the latest sources and then `npm publish` the current state."
48-
},
49-
{
50-
"manifestPath": "package.json",
51-
"projectName": "node-scripts-docs",
52-
"scriptName": "npm:publish:major",
53-
"scriptCode": "npm version major && npm publish",
54-
"isGlobal": true,
5510
"isRootManifest": true
5611
},
57-
{
58-
"manifestPath": "package.json",
59-
"projectName": "node-scripts-docs",
60-
"scriptName": "npm:publish:minor",
61-
"scriptCode": "npm version minor && npm publish",
62-
"isGlobal": true,
63-
"isRootManifest": true
64-
},
65-
{
66-
"manifestPath": "package.json",
67-
"projectName": "node-scripts-docs",
68-
"scriptName": "npm:publish:patch",
69-
"scriptCode": "npm version patch && npm publish",
70-
"isGlobal": true,
71-
"isRootManifest": true,
72-
"description": "Publish a patch release to the npm registry."
73-
},
74-
{
75-
"manifestPath": "package.json",
76-
"projectName": "node-scripts-docs",
77-
"scriptName": "nsd-debug",
78-
"scriptCode": "yarn build && node output/node-scripts-docs.js",
79-
"isGlobal": false,
80-
"isRootManifest": true,
81-
"description": "Build the latest sources and then use the build output to execute your command. Parameters are passed through by `yarn`."
82-
},
8312
{
8413
"manifestPath": "package.json",
8514
"projectName": "node-scripts-docs",
8615
"scriptName": "prepack",
87-
"scriptCode": "yarn build",
16+
"scriptCode": "make",
8817
"isGlobal": false,
8918
"isRootManifest": true
9019
},
9120
{
9221
"manifestPath": "package.json",
9322
"projectName": "node-scripts-docs",
94-
"scriptName": "test",
95-
"scriptCode": "node --experimental-vm-modules $(yarn bin jest)",
23+
"scriptName": "preversion",
24+
"scriptCode": "make lint test",
9625
"isGlobal": false,
97-
"isRootManifest": true,
98-
"description": "Execute all Jest test suites."
99-
},
100-
{
101-
"manifestPath": "package.json",
102-
"projectName": "node-scripts-docs",
103-
"scriptName": "test:coverage",
104-
"scriptCode": "node --experimental-vm-modules $(yarn bin jest) --coverage",
105-
"isGlobal": true,
106-
"isRootManifest": true,
107-
"description": "Execute Jest test suites and calculate code coverage."
26+
"isRootManifest": true
10827
}
10928
],
11029
"version": 1
File renamed without changes.

0 commit comments

Comments
 (0)