Skip to content

Commit 5418bd8

Browse files
committed
chore: add support for hono,itty,none router to http-ts and http-js templates
Signed-off-by: Thorsten Hans <[email protected]>
1 parent bb62fb7 commit 5418bd8

File tree

27 files changed

+162
-365
lines changed

27 files changed

+162
-365
lines changed

templates/http-js-hono/content/.gitignore

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

templates/http-js-hono/content/.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

templates/http-js-hono/content/config/knitwit.json

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

templates/http-js-hono/content/package.json

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

templates/http-js-hono/content/spin.toml

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

templates/http-js-hono/content/src/index.js

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

templates/http-js-hono/content/webpack.config.js

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

templates/http-js-hono/metadata/snippets/component.txt

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

templates/http-js-hono/metadata/spin-template.toml

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
{
2-
"name": "{{project-name | kebab_case}}",
3-
"version": "1.0.0",
4-
"description": "{{project-description}}",
5-
"main": "index.js",
6-
"scripts": {
7-
"build": "npx webpack && mkdirp dist && j2w -i build/bundle.js -o dist/{{ project-name | kebab_case }}.wasm",
8-
"test": "echo \"Error: no test specified\" && exit 1"
9-
},
10-
"keywords": [],
11-
"author": "",
12-
"license": "ISC",
13-
"devDependencies": {
14-
"mkdirp": "^3.0.1",
15-
"webpack": "^5.74.0",
16-
"webpack-cli": "^4.10.0"
17-
},
18-
"dependencies": {
19-
"@spinframework/build-tools": "^1.0.1",
20-
"@spinframework/wasi-http-proxy": "^1.0.0",
21-
"itty-router": "^5.0.18"
22-
}
23-
}
2+
"name": "{{project-name | kebab_case}}",
3+
"version": "1.0.0",
4+
"description": "{{project-description}}",
5+
"main": "index.js",
6+
"scripts": {
7+
"build": "npx webpack && mkdirp dist && j2w -i build/bundle.js -o dist/{{ project-name | kebab_case }}.wasm",
8+
"test": "echo \"Error: no test specified\" && exit 1"
9+
},
10+
"keywords": [],
11+
"author": "",
12+
"license": "ISC",
13+
"devDependencies": {
14+
"mkdirp": "^3.0.1",
15+
"webpack": "^5.74.0",
16+
"webpack-cli": "^4.10.0"
17+
},
18+
"dependencies": {
19+
{%- case http-router -%}
20+
{% when "hono" %}
21+
"hono": "^4.7.4",
22+
{% when "itty" %}
23+
"itty-router": "^5.0.18",
24+
{%- endcase %}
25+
"@spinframework/build-tools": "^1.0.1",
26+
"@spinframework/wasi-http-proxy": "^1.0.0",
27+
}
28+
}

0 commit comments

Comments
 (0)