Urban-Analytics-Technology-Platform / web-app-template

https://urban-analytics-technology-platform.github.io/web-app-template/
3 stars 0 forks source link

CI #14

Closed griff-rees closed 4 months ago

griff-rees commented 4 months ago
griff-rees commented 4 months ago

@stuartlynn, @dabreegster and @yongrenjie: any preferences on husky vs pre-commit? I've used the latter a lot, but happy to give husky a go.

griff-rees commented 4 months ago

Hmm... maybe pre-commit isn't a viable option with prettier. See https://github.com/prettier/prettier/issues/15742

griff-rees commented 4 months ago

Basic pre-commit linting now works, but that currently skips prettier. I've left a config for that in. I think it may be useable now (initially just set it to markdown as a test, running on everything unsurprisingly leads to a lot of changes).

What I'm guessing is the default test generated for ua_components fails as there's no page to render so I've modified that test. The remaining fail is comes from attempting to run a rust backend (see failed run):

template_app test: [WebServer] Error: Can't find ../rust_backend/pkg, run wasm-pack build ../rust_backend --target web first
template_app test: [WebServer] x Build failed in 6ms
template_app test: [WebServer] error during build:
template_app test: Error: [vite-plugin-wasm-pack] ENOENT: no such file or directory, open '../rust_backend/pkg/rust_backend_bg.wasm'