1. A method for adding directives for versions of JavaScript files directly into source code, comprising: receiving a source file for preprocessing, wherein the source file is written in a client-side scripting language; parsing the source file; identifying directive information for a directive within the source file, wherein the directive information comprises data on at least a portion of a client-side scripting language file and a mode; creating a version of the source file for the mode, wherein the version of the source file comprises source code from the source file and the at least a portion of the client-side scripting language file; and associating metadata with the directive and the version of the source file.