bash-stack icon indicating copy to clipboard operation
bash-stack copied to clipboard

Make it js framework independent

Open the-man-with-a-golden-mind opened this issue 11 months ago • 1 comments

I've figure out that for each project, I am making a small changes in the core.sh I am changing the htmx_page() so I could have all of the js and css definitions in config.sh ` function htmx_page() { [[ ${HTTP_HEADERS["hx-request"]} == "true" ]] || [[ "$INTERNAL_REQUEST" == "true" ]] || cat <<-EOF

${STYLES[*]} ${SCRIPTS[*]} $(_inject_hmr) EOF `

and also I am adding

` function page() { [[ "$INTERNAL_REQUEST" == "true" ]] || cat <<-EOF

${STYLES[*]} ${SCRIPTS[*]} EOF

cat

cat <<-EOF

EOF } `

for more htmx independence. IMHO it looks clearer.

What do you think about change the generator and add the htmx as the possibility not something mandatory? :)

not sure i follow the exact suggestion, but i do like the idea of a more generalized page function (and making the htmx_page function an opt-in thing)

dont have time to do this myself right now, but if you want to put up a PR happy to take a look

cgsdev0 avatar Mar 08 '24 23:03 cgsdev0