These are chat archives for brunch/brunch

8th
Sep 2016
Sebastien Vaucouleur
@vaucouleur
Sep 08 2016 11:15
Hi, I'm trying to statically inject minimized javascript libraries into an html page (in order to support a scenario where my users might not have a internet connection and everything should be contained in a single html page). Is there a recommended way to do this kind of things with brunch.js ?
Sebastien Vaucouleur
@vaucouleur
Sep 08 2016 11:24
By statically, I mean that the javascript libraries should end up in a <script></script> section in the html file
Ryan Sobol
@ryansobol
Sep 08 2016 14:43
@vaucouleur in other words, you want to inject the content in an app/whatever.js file into an app/assets/whatever.html file without linking the two files with a <script src="/whatever.js></script>` tag?
Sebastien Vaucouleur
@vaucouleur
Sep 08 2016 14:44
@ryansobol That's right. I want to completely inject the content of whatever.js inside the html file
This approach can make sense, from a pratical point of view, for statically generated reports. You generate the report as a single html file that you give to a client. The html file as an encapsulated "document" (just as you would hand some excel file to a client for example, fully encapsulated).