Skip to content

Commit d3eafe2

Browse files
authored
feat: add typescript templates (#355)
* feat: add typescript templates Bumps the faas-js-runtime dependency to 0.7.1 and Node.js buildpack dependency to v0.8.1 fix file globbing on windows adjust eslint/prettier for windows improve READMEs add usage guide Signed-off-by: Lance Ball <[email protected]>
1 parent caf0659 commit d3eafe2

31 files changed

+8568
-636
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
/func_*
33
/templates/go/events/go.sum
44
/templates/go/http/go.sum
5+
/templates/typescript/events/build
6+
/templates/typescript/http/build
57
/coverage.out
68
/bin
79

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ $(TEMPLATE_PACKAGE): templates $(TEMPLATE_DIRS) $(TEMPLATE_FILES)
2929
rm -rf templates/node/http/node_modules
3030
rm -rf templates/python/events/__pycache__
3131
rm -rf templates/python/http/__pycache__
32+
rm -rf templates/typescript/events/node_modules
33+
rm -rf templates/typescript/http/node_modules
3234
# to install pkger: go get github.com/markbates/pkger/cmd/pkger
3335
$(PKGER)
3436

@@ -52,7 +54,7 @@ $(LINUX):
5254
$(WINDOWS):
5355
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o $(WINDOWS) -ldflags "-X main.date=$(DATE) -X main.vers=$(VERS) -X main.hash=$(HASH)" ./cmd/$(BIN)
5456

55-
test: test-binary test-node test-python test-quarkus test-go
57+
test: test-binary test-node test-python test-quarkus test-go test-typescript
5658

5759
test-binary:
5860
go test -race -cover -coverprofile=coverage.out ./...
@@ -61,6 +63,10 @@ test-node:
6163
cd templates/node/events && npm ci && npm test && rm -rf node_modules
6264
cd templates/node/http && npm ci && npm test && rm -rf node_modules
6365

66+
test-typescript:
67+
cd templates/typescript/events && npm ci && npm test && rm -rf node_modules build
68+
cd templates/typescript/http && npm ci && npm test && rm -rf node_modules build
69+
6470
test-python:
6571
cd templates/python/events && pip3 install -r requirements.txt && python3 test_func.py
6672
cd templates/python/http && python3 test_func.py

buildpacks/builder.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ var RuntimeToBuildpack = map[string]string{
3434
"go": "quay.io/boson/faas-go-builder",
3535
"springboot": "quay.io/boson/faas-springboot-builder",
3636
"python": "quay.io/boson/faas-python-builder",
37+
"typescript": "quay.io/boson/faas-nodejs-builder",
3738
}
3839

3940
// Build the Function at path.

0 commit comments

Comments
 (0)