So we are having this school project, and are going to fix some small issues with the code. This has nothing to do with the assignment, but rather my curiousness. The static files is defined with a index.html and a app.min.js, which index.html is requiring.
In the app.min.js-file, the css is defined like this:
var css = "/*!\n * Bootstrap v3.3.5 (http://getbootstrap.com)\n *
Copyright` `2011-2015 Twitter, Inc.\n * Licensed under MIT
(https://github.com/twbs/bootstrap/blob/master/LICENSE)\n *//*! normalize.css`
v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-
family:sans`-`serif;-webkit-text-size-adjust:100%;-ms-text-size-
adjust:100%}body{margin:0}article,aside,details,figcaption,`.....
etc.
And is somehow instantiated. What is the purpose of minifying the css to a js file like this? How do you do it? Looked at something called css-to-js but didn't get it to work...
Hope this question isn't too fussy, thankful for answers!
module.exports = css;and load the CSS using the Javascript module facility..jsfile, it executes all the code in the file. Presumably there's something in there that instantiates the module and does something with the css variable.