Skip to content

Commit

Permalink
feat: generate ts declarations (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
filahf authored Sep 23, 2024
1 parent b8669af commit f8d2063
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ TARGETS = $(HDR_TARGETS) \
$(JSON_TARGETS) $(WOFF_TARGETS) \
$(GLB_TARGETS) $(GLTF_TARGETS)
all: $(TARGETS)
all: $(TARGETS) ts-declarations
$(DIST)/%.js: $(SRC)/%.b64
mkdir -p $(dir $@)
Expand Down Expand Up @@ -79,3 +79,7 @@ $(DIST)/%.js: $(SRC)/%.b64
.PHONY: clean
clean:
rm -rf $(DIST)
.PHONY: ts-declarations
ts-declarations:
cd $(DIST) && npx -p typescript tsc **/*.js --declaration --allowJs --emitDeclarationOnly
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"@gltf-transform/cli": "^3.4.0",
"copyfiles": "^2.3.0",
"json": "^11.0.0",
"semantic-release": "^20.1.1"
"semantic-release": "^20.1.1",
"typescript": "^5.6.2"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit f8d2063

Please sign in to comment.