batijs / bati

Next-gen scaffolder. Get started with fully-functional apps, and choose any tool you want.
https://batijs.dev
MIT License
194 stars 11 forks source link

fix: don't include server files when no server is selected. #274

Closed phonzammi closed 1 week ago

phonzammi commented 2 weeks ago

I don't want a Node.js server or SSR as I already have a completely separated backend with a REST API. I would like to serve the app as a completely static HTML/CSS/JS. But when I scaffold the app with Vike or Bâti, both come with the server part (I know I can remove it). Originally posted by @ignition42 in https://github.com/vikejs/vike/discussions/1704

@magne4000, Let me know what do you think about this PR ?

magne4000 commented 1 week ago

:+1: Oh great, I'll perhaps add some tests some ensure that some files are present or not in some e2e tests.

More generally, to avoid messing with bati.flags in package.json for shared file, Bati could be updated to understand when a file is actually imported or not. This would allow us to simplify organization a little, and avoid falling into such cases in the future. It's on my todo list after Cloudflare integration.

magne4000 commented 1 week ago

More generally, to avoid messing with bati.flags in package.json for shared file, Bati could be updated to understand when a file is actually imported or not. This would allow us to simplify organization a little, and avoid falling into such cases in the future. It's on my todo list after Cloudflare integration.

See https://github.com/batijs/bati/issues/275