concept JavaScript string in category javascript

This is an excerpt from Manning's book Third-Party JavaScript.
Afterward, it’s just a matter of taking this string and injecting it as a style rule into the page. We’ll get to that in a minute, but first, how do you actually convert a CSS file to a JavaScript string like this?
You’ll need some kind of build tool that reads your CSS file, converts it to a JavaScript string, and then embeds that string as a variable into your final, built JavaScript file. This is probably not something you want to do during development; otherwise you’ll have to rebuild your JavaScript every time you change a style rule. Embedding CSS is thus a technique that’s best reserved for production use only.
Listing 3.5 shows a sample Python function that converts a CSS file to a JavaScript string. It uses a clever CSS-parsing library for Python called cssutils (see http://pypi.python.org/pypi/cssutils/). But like other server-side examples in this book, this simple function could be written in any language.