Skip to content

Commit f4d4a5c

Browse files
committed
Unified package commands
1 parent 06010fe commit f4d4a5c

File tree

5 files changed

+42
-98
lines changed

5 files changed

+42
-98
lines changed

.github/workflows/compiler.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/examples.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Example Builds
1+
name: Examples
22

33
on:
44
push:

.github/workflows/shared.yaml renamed to .github/workflows/packages.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Shared
1+
name: Packages
22

33
on:
44
push:
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
build-and-test:
12-
name: Shared Build and Lint
12+
name: Packages Build and Lint
1313
runs-on: ubuntu-latest
1414

1515
steps:
@@ -23,9 +23,12 @@ jobs:
2323
node-version: "24"
2424
- name: Install dependencies
2525
run: npm ci
26+
- name: Build packages
27+
run: make build-packages
28+
# We have to run npm install again to link the newly built docs-md binary
29+
- name: Link workspace binaries
30+
run: npm install --workspaces
2631
- name: Lint
27-
working-directory: ./packages/shared
28-
run: npm run lint
32+
run: make lint-packages
2933
- name: Type check
30-
working-directory: ./packages/shared
31-
run: npm run type-check
34+
run: make type-check-packages

.github/workflows/react.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.

Makefile

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,39 @@
1-
type-check:
2-
npm run type-check --workspaces
31

4-
lint:
5-
npm run lint --workspaces
6-
7-
test: type-check lint
8-
npm test --workspaces
9-
10-
format:
11-
npm run format --workspaces
122

133
install:
144
npm install
15-
npm install --workspaces
5+
6+
type-check: type-check-packages type-check-examples
7+
8+
type-check-packages:
9+
npm run type-check --workspaces --workspace="packages/*"
10+
11+
type-check-examples:
12+
npm run type-check --workspaces --workspace="examples/*"
13+
14+
lint: lint-packages lint-examples
15+
16+
lint-packages:
17+
npm run lint --workspaces --workspace="packages/*"
18+
19+
lint-examples:
20+
npm run lint --workspaces --workspace="examples/*"
21+
22+
format: format-packages format-examples
23+
24+
format-packages:
25+
npm run format --workspaces --workspace="packages/*"
26+
27+
format-examples:
28+
npm run format --workspaces --workspace="examples/*"
29+
30+
build: build-packages build-examples
31+
32+
build-packages: install
33+
npm run build --workspaces --workspace="packages/*"
34+
35+
build-examples: install
36+
npm run build --workspaces --workspace="examples/*"
1637

1738
build-api-docs:
1839
npm run build-api-docs --workspaces -- --clean
@@ -23,21 +44,3 @@ verify-api-docs: build-api-docs
2344
echo "Example build out of date. Please run make build-api-docs and commit the results"; \
2445
exit 1; \
2546
fi
26-
27-
build: install
28-
npm run build --workspaces
29-
30-
start:
31-
npx concurrently \
32-
"npm run dev --workspace=server" \
33-
"npm run dev --workspace=client/web" \
34-
"npm run dev --workspace=demos" \
35-
"npm run dev --workspace=asset-proxy"
36-
37-
add-demo:
38-
npm run add-demo --workspace="@speakeasy-api/codewords-demos"
39-
40-
.PHONY: interactive
41-
42-
interactive:
43-
npm run interactive --workspace=server -- --spec=$(spec) --lang=$(lang) --token=$(token) --command=$(command)

0 commit comments

Comments
 (0)