code: function (fileName, fileContents, config, pluginCollector) {
              var parts = (String(config.optimize)).split('.'),
                  optimizerName = parts[0],
                  keepLines = parts[1] === 'keepLines',
                  licenseContents = '',
                  optFunc;
  
              config = config || {};
  
              //Apply pragmas/namespace renaming
              fileContents = pragma.process(fileName, fileContents, config, 'OnSave', pluginCollector);
  
              //Optimize the JS files if asked.
              if (optimizerName && optimizerName !== 'none') {
                  optFunc = envOptimize[optimizerName] || optimize.optimizers[optimizerName];
                  if (!optFunc) {
                      throw new Error('optimizer with name of "' +
                                      optimizerName +
                                      '" not found for this environment');
                  }
  
                  if (config.preserveLicenseComments) {
                      //Pull out any license comments for prepending after optimization.
                      try {
                          licenseContents = parse.getLicenseComments(fileName, fileContents);
                      } catch (e) {
                          logger.error('Cannot parse file: ' + fileName + ' for comments. Skipping it. Error is:\n' + e.toString());
                      }
                  }
  
                  fileContents = licenseContents + optFunc(fileName, fileContents, keepLines,
                                          config[optimizerName]);
              }
  
              return fileContents;
          }
docs: Optimizes a file that contains JavaScript content. Optionally collects
  plugin resources mentioned in a file, and then passes the content
  through an minifier if one is specified via config.optimize.
  
  @param {String} fileName the name of the file that matches the
  fileContents.
  @param {String} fileContents the string of JS to optimize.
  @param {Object} [config] the build config object.
  @param {Array} [pluginCollector] storage for any plugin resources
  found.