cprbucat2 / team-feedback

A Dockerized web application written in Go to ease the submission and review of feedback for teams.
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Write a small script to compile single HTML files from those with linked CSS/JS #25

Closed bobpaw closed 1 year ago

bobpaw commented 1 year ago

Is your feature request related to a problem? Please describe. One of our deliverables is a single web form.

Describe the solution you'd like We can probably write a short Go script to find and replace <link> and <script> tags with their corresponding file contents.

Describe alternatives you've considered There may be a package that does this. Webpack might do the same thing but is very bulky and we do not currently use Node in our stack. It may make sense if we gain significant Javascript files but for now I would prefer to avoid adding it.

Additional context These guys do something similar with Python and beautiful soup: https://stackoverflow.com/questions/44646481/merging-js-css-html-into-single-html

bobpaw commented 1 year ago

This looks like a good example of parsing html with Go https://stackoverflow.com/questions/30109061/golang-parse-html-extract-all-content-with-body-body-tags

bobpaw commented 1 year ago

Superseded by #49.