Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add TS template #195

Merged
merged 1 commit into from
Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ name: Testapalooza
on: pull_request

jobs:

build:
strategy:
matrix:
golang: [1.17]
matrix:
golang: [1.17]

name: Smoke
runs-on: ubuntu-latest
Expand Down Expand Up @@ -38,14 +37,14 @@ jobs:
subo create project smoketest
subo create runnable rs-test --lang rust --dir ./smoketest
subo create runnable swift-test --lang swift --dir ./smoketest
subo create runnable as-test --lang typescript --dir ./smoketest
subo create runnable as-test --lang assemblyscript --dir ./smoketest
subo create runnable tinygo-test --lang tinygo --dir ./smoketest

- name: Build project
run: |
export PATH=$PATH:$(go env GOPATH)/bin
subo build ./smoketest --builder-tag dev

- name: Check TinyGo version number consistency
run: |
builder/docker/tinygo/sanity.sh
builder/docker/tinygo/sanity.sh
2 changes: 1 addition & 1 deletion builder/context/buildcontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var dockerImageForLang = map[string]string{
"assemblyscript": "suborbital/builder-as",
"tinygo": "suborbital/builder-tinygo",
"grain": "--platform linux/amd64 suborbital/builder-gr",
"js": "suborbital/builder-js",
"typescript": "suborbital/builder-js",
}

// BuildContext describes the context under which the tool is being run.
Expand Down
4 changes: 2 additions & 2 deletions builder/context/native.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var nativeCommandsForLang = map[string]map[string][]string{
"grain": {
"grain compile index.gr -I _lib -o {{ .Name }}.wasm",
},
"js": {
"typescript": {
"webpack",
"javy build/index.js -o {{ .Name }}.wasm",
},
Expand All @@ -65,7 +65,7 @@ var nativeCommandsForLang = map[string]map[string][]string{
"grain": {
"grain compile index.gr -I _lib -o {{ .Name }}.wasm",
},
"js": {
"typescript": {
"webpack",
"javy build/index.js -o {{ .Name }}.wasm",
},
Expand Down
4 changes: 2 additions & 2 deletions builder/context/prereq.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var PreRequisiteCommands = map[string]map[string][]Prereq{
},
},
"tinygo": {},
"js": {
"typescript": {
Prereq{
File: "node_modules",
Command: "npm install --include=dev",
Expand Down Expand Up @@ -70,7 +70,7 @@ var PreRequisiteCommands = map[string]map[string][]Prereq{
},
},
"tinygo": {},
"js": {
"typescript": {
Prereq{
File: "node_modules",
Command: "npm install --include=dev",
Expand Down
12 changes: 6 additions & 6 deletions subo/command/create_runnable.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ var validLangs = map[string]bool{
"assemblyscript": true,
"tinygo": true,
"grain": true,
"js": true,
"typescript": true,
}

// langAliases are aliases for languages.
var langAliases = map[string]string{
"typescript": "assemblyscript",
"rs": "rust",
"go": "tinygo",
"gr": "grain",
"ts": "js",
"as": "assemblyscript",
"rs": "rust",
"go": "tinygo",
"gr": "grain",
"ts": "typescript",
}

// CreateRunnableError wraps errors for CreateRunnableCmd() failures.
Expand Down
12 changes: 0 additions & 12 deletions templates/js/babel.config.js

This file was deleted.

11 changes: 0 additions & 11 deletions templates/js/jest.config.js

This file was deleted.

33 changes: 0 additions & 33 deletions templates/js/package.json.tmpl

This file was deleted.

95 changes: 0 additions & 95 deletions templates/js/src/env.d.ts

This file was deleted.

Loading