@@ -387,14 +387,24 @@ $(foreach chart,$(charts),build/$(chart)_helm_$(VERSION).tgz): build/%_helm_$(VE
387
387
--chart $* \
388
388
--output " $@ "
389
389
390
- site/out/index.html : site/package.json $(shell find ./site $(FIND_EXCLUSIONS ) -type f \( -name '* .ts' -o -name '* .tsx' \) )
390
+ node_modules/.installed : package.json
391
+ ./scripts/pnpm_install.sh
392
+
393
+ offlinedocs/node_modules/.installed : offlinedocs/package.json
394
+ cd offlinedocs
395
+ ../scripts/pnpm_install.sh
396
+
397
+ site/node_modules/.installed : site/package.json
398
+ cd site
399
+ ../scripts/pnpm_install.sh
400
+
401
+ site/out/index.html : site/node_modules/.installed $(shell find ./site $(FIND_EXCLUSIONS ) -type f \( -name '* .ts' -o -name '* .tsx' \) )
391
402
cd site
392
403
# prevents this directory from getting to big, and causing "too much data" errors
393
404
rm -rf out/assets/
394
- ../scripts/pnpm_install.sh
395
405
pnpm build
396
406
397
- offlinedocs/out/index.html : $(shell find ./offlinedocs $(FIND_EXCLUSIONS ) -type f) $(shell find ./docs $(FIND_EXCLUSIONS ) -type f | sed 's: :\\ :g')
407
+ offlinedocs/out/index.html : offlinedocs/node_modules/.installed $(shell find ./offlinedocs $(FIND_EXCLUSIONS ) -type f) $(shell find ./docs $(FIND_EXCLUSIONS ) -type f | sed 's: :\\ :g')
398
408
cd offlinedocs
399
409
../scripts/pnpm_install.sh
400
410
pnpm export
@@ -427,7 +437,7 @@ fmt/go:
427
437
xargs -0 go run mvdan.cc/
[email protected] -w -l
428
438
.PHONY : fmt/go
429
439
430
- fmt/ts :
440
+ fmt/ts : site/node_modules/.installed
431
441
echo " $( GREEN) ==>$( RESET) $( BOLD) fmt/ts$( RESET) "
432
442
cd site
433
443
# Avoid writing files in CI to reduce file write activity
438
448
endif
439
449
.PHONY : fmt/ts
440
450
441
- fmt/biome :
451
+ fmt/biome : site/node_modules/.installed
442
452
echo " $( GREEN) ==>$( RESET) $( BOLD) fmt/biome$( RESET) "
443
453
cd site
444
454
# Avoid writing files in CI to reduce file write activity
464
474
endif
465
475
.PHONY : fmt/shfmt
466
476
467
- fmt/markdown :
477
+ fmt/markdown : node_modules/.installed
468
478
echo " $( GREEN) ==>$( RESET) $( BOLD) fmt/markdown$( RESET) "
469
- ./scripts/pnpm_install.sh
470
479
pnpm format-docs
471
480
.PHONY : fmt/markdown
472
481
@@ -477,7 +486,7 @@ lint/site-icons:
477
486
./scripts/check_site_icons.sh
478
487
.PHONY : lint/site-icons
479
488
480
- lint/ts :
489
+ lint/ts : site/node_modules/.installed
481
490
cd site
482
491
pnpm lint
483
492
.PHONY : lint/ts
@@ -504,8 +513,7 @@ lint/helm:
504
513
make lint
505
514
.PHONY : lint/helm
506
515
507
- lint/markdown :
508
- ./scripts/pnpm_install.sh
516
+ lint/markdown : node_modules/.installed
509
517
pnpm lint-docs
510
518
.PHONY : lint/markdown
511
519
@@ -653,22 +661,19 @@ vpn/vpn.pb.go: vpn/vpn.proto
653
661
--go_opt=paths=source_relative \
654
662
./vpn/vpn.proto
655
663
656
- site/src/api/typesGenerated.ts : $(wildcard scripts/apitypings/* ) $(shell find ./codersdk $(FIND_EXCLUSIONS ) -type f -name '* .go')
664
+ site/src/api/typesGenerated.ts : site/node_modules/.installed $(wildcard scripts/apitypings/* ) $(shell find ./codersdk $(FIND_EXCLUSIONS ) -type f -name '* .go')
657
665
# -C sets the directory for the go run command
658
666
go run -C ./scripts/apitypings main.go > $@
659
667
cd site
660
- ../scripts/pnpm_install.sh
661
668
pnpm exec biome format --write src/api/typesGenerated.ts
662
669
663
- site/e2e/provisionerGenerated.ts : provisionerd/proto/provisionerd.pb.go provisionersdk/proto/provisioner.pb.go
670
+ site/e2e/provisionerGenerated.ts : site/node_modules/.installed provisionerd/proto/provisionerd.pb.go provisionersdk/proto/provisioner.pb.go
664
671
cd site
665
- ../scripts/pnpm_install.sh
666
672
pnpm run gen:provisioner
667
673
668
- site/src/theme/icons.json : $(wildcard scripts/gensite/* ) $(wildcard site/static/icon/* )
674
+ site/src/theme/icons.json : site/node_modules/.installed $(wildcard scripts/gensite/* ) $(wildcard site/static/icon/* )
669
675
go run ./scripts/gensite/ -icons " $@ "
670
676
cd site
671
- ../scripts/pnpm_install.sh
672
677
pnpm exec biome format --write src/theme/icons.json
673
678
674
679
examples/examples.gen.json : scripts/examplegen/main.go examples/examples.go $(shell find ./examples/templates)
@@ -686,46 +691,38 @@ codersdk/rbacresources_gen.go: scripts/typegen/codersdk.gotmpl scripts/typegen/m
686
691
go run scripts/typegen/main.go rbac codersdk > /tmp/rbacresources_gen.go
687
692
mv /tmp/rbacresources_gen.go codersdk/rbacresources_gen.go
688
693
689
- site/src/api/rbacresourcesGenerated.ts : scripts/typegen/codersdk.gotmpl scripts/typegen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go
694
+ site/src/api/rbacresourcesGenerated.ts : site/node_modules/.installed scripts/typegen/codersdk.gotmpl scripts/typegen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go
690
695
go run scripts/typegen/main.go rbac typescript > " $@ "
691
696
cd site
692
- ../scripts/pnpm_install.sh
693
697
pnpm exec biome format --write src/api/rbacresourcesGenerated.ts
694
698
695
- site/src/api/countriesGenerated.ts : scripts/typegen/countries.tstmpl scripts/typegen/main.go codersdk/countries.go
699
+ site/src/api/countriesGenerated.ts : site/node_modules/.installed scripts/typegen/countries.tstmpl scripts/typegen/main.go codersdk/countries.go
696
700
go run scripts/typegen/main.go countries > " $@ "
697
701
cd site
698
- ../scripts/pnpm_install.sh
699
702
pnpm exec biome format --write src/api/countriesGenerated.ts
700
703
701
- docs/admin/integrations/prometheus.md : scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics
704
+ docs/admin/integrations/prometheus.md : node_modules/.installed scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics
702
705
go run scripts/metricsdocgen/main.go
703
- ./scripts/pnpm_install.sh
704
706
pnpm exec markdownlint-cli2 --fix ./docs/admin/integrations/prometheus.md
705
707
pnpm exec markdown-table-formatter ./docs/admin/integrations/prometheus.md
706
708
707
- docs/reference/cli/index.md : scripts/clidocgen/main.go examples/examples.gen.json $(GO_SRC_FILES )
709
+ docs/reference/cli/index.md : node_modules/.installed site/node_modules/.installed scripts/clidocgen/main.go examples/examples.gen.json $(GO_SRC_FILES )
708
710
CI=true BASE_PATH=" ." go run ./scripts/clidocgen
709
- ./scripts/pnpm_install.sh
710
711
pnpm exec markdownlint-cli2 --fix ./docs/reference/cli/* .md
711
712
pnpm exec markdown-table-formatter ./docs/reference/cli/* .md
712
713
cd site
713
- ../scripts/pnpm_install.sh
714
714
pnpm exec biome format --write ../docs/manifest.json
715
715
716
- docs/admin/security/audit-logs.md : coderd/database/querier.go scripts/auditdocgen/main.go enterprise/audit/table.go coderd/rbac/object_gen.go
716
+ docs/admin/security/audit-logs.md : node_modules/.installed coderd/database/querier.go scripts/auditdocgen/main.go enterprise/audit/table.go coderd/rbac/object_gen.go
717
717
go run scripts/auditdocgen/main.go
718
- ./scripts/pnpm_install.sh
719
718
pnpm exec markdownlint-cli2 --fix ./docs/admin/security/audit-logs.md
720
719
pnpm exec markdown-table-formatter ./docs/admin/security/audit-logs.md
721
720
722
- coderd/apidoc/swagger.json : $(shell find ./scripts/apidocgen $(FIND_EXCLUSIONS ) -type f) $(wildcard coderd/* .go) $(wildcard enterprise/coderd/* .go) $(wildcard codersdk/* .go) $(wildcard enterprise/wsproxy/wsproxysdk/* .go) $(DB_GEN_FILES ) .swaggo docs/manifest.json coderd/rbac/object_gen.go
721
+ coderd/apidoc/swagger.json : node_modules/.installed site/node_modules/.installed $(shell find ./scripts/apidocgen $(FIND_EXCLUSIONS ) -type f) $(wildcard coderd/* .go) $(wildcard enterprise/coderd/* .go) $(wildcard codersdk/* .go) $(wildcard enterprise/wsproxy/wsproxysdk/* .go) $(DB_GEN_FILES ) .swaggo docs/manifest.json coderd/rbac/object_gen.go
723
722
./scripts/apidocgen/generate.sh
724
- ./scripts/pnpm_install.sh
725
723
pnpm exec markdownlint-cli2 --fix ./docs/reference/api/* .md
726
724
pnpm exec markdown-table-formatter ./docs/reference/api/* .md
727
725
cd site
728
- ../scripts/pnpm_install.sh
729
726
pnpm exec biome format --write ../docs/manifest.json ../coderd/apidoc/swagger.json
730
727
731
728
update-golden-files : \
@@ -909,5 +906,5 @@ test-clean:
909
906
.PHONY : test-clean
910
907
911
908
.PHONY : test-e2e
912
- test-e2e :
909
+ test-e2e : site/node_modules/.installed
913
910
cd ./site && DEBUG=pw:api pnpm playwright:test --forbid-only --workers 1
0 commit comments