Process sources with options.
@param {Array<string>} sources
@param {object} options
@returns {string}
430552
function process(sources, options) {
		sources = explodeall(sources);
		if (!grunt.fail.errorcount) {
			var content = extract(sources, options);
			return enclose(content.join(SPACER));
		}
	}
283332
function reloadSources(names) {

    names = u.isArray(names) ? names :
           names ? [names] :
           u.keys(opts.source$);

    var results = [];

    u.each(names, function(name) {
      var source = opts.source$[name];
      if (source) {
        source._reloadFromSource = true;
        results.push(name);
      } else {
        results.push(log('reloadSources unknown source ' + name));
      }
    });

    generator.reload(); // throttled
    return results;
  }
934007
function makeRelations (type, ids, options) {
  var res = []

  _.each(ids, function (id) {
    res.push(makeRelation(type, id, options))
  })

  return res
}
1247146
def compile(self, source, options={}):
    
    options = dict(options)
    if "paths" in options:
      options["paths"] += self.paths
    else:
      options["paths"] = self.paths

    if "compress" not in options:
      options["compress"] = self.compress

    return self.context.call("compiler", source, options, self.plugins, self.imports)
1317790
function exec(paths, options) {
    ls.self = this;
    paths = paths !== null && !Array.isArray(paths) && (typeof paths === 'undefined' ? 'undefined' : _typeof(paths)) === 'object' ? paths.paths : paths;
    paths = paths || ['.'];
    paths = Array.isArray(paths) ? paths : [paths];
    paths = expand(paths);

    options = options || {};

    var preSortedPaths = ls.preSortPaths(paths);

    var dirResults = [];
    for (var i = 0; i < preSortedPaths.dirs.length; ++i) {
      if (options.recursive) {
        var result = ls.execDirRecursive(preSortedPaths.dirs[i], options);
        dirResults = dirResults.concat(result);
      } else {
        dirResults.push(ls.execDir(preSortedPaths.dirs[i], options));
      }
    }

    var stdout = '';
    if (preSortedPaths.files.length > 0) {
      stdout += ls.execLsOnFiles('.', preSortedPaths.files, options).results;
    }

    var dirOutput = ls.formatAll(dirResults, options, dirResults.length + preSortedPaths.files.length > 1);
    stdout += stdout && dirOutput ? '\n\n' + dirOutput : dirOutput;
    if (strip(stdout).trim() !== '') {
      ls.self.log(String(stdout).replace(/\\/g, '/'));
    }

    return 0;
  }
398472
function buildSources (path, options) {
  var excludes = options.excludes;
  var sources = [];

  if (options.defaults) {
    sources = options.defaults.concat(sources);
  }

  var environment = getEnvironment(options);

  var basename = nodePath.basename(path);
  var ext = nodePath.extname(basename);

  var pathNoExt = path.slice(0, 0 - ext.length);

  if (!ext) {
    ext = '.json';
  }

  sources.push(pathNoExt + ext);

  if (excludes['env-file'] !== true) {
    sources.push(pathNoExt + '-' + environment + ext);
  }

  if (excludes['local-file'] !== true) {
    sources.push(pathNoExt + '-local' + ext);
  }

  if (excludes['env'] !== true) {
    sources.push(getEnvNodeConfig());
  }

  if (excludes['command-line'] !== true) {
    sources.push(getCommandLineNodeConfig());
  }

  if (options.overrides) {
    sources = sources.concat(options.overrides);
  }

  if (typeof options.sources === 'function') {
    var newSources = options.sources(sources);
    if (newSources != null) {
      sources = newSources;
    }
  }

  return sources;
}
57775
function processSiteDescription(options) {
    options = options || {};
    if (!siteDescriptionReader.isProcessed() || options.isForceProcess) {
        siteDescription = siteDescriptionReader.getSite();
        regenerateRoutes();
        return siteDescription;
    }
    return false;
}
544640
def _ParseSourcePathOption(self, options):
    
    self._source_path = self.ParseStringOption(options, self._SOURCE_OPTION)
    if not self._source_path:
      raise errors.BadConfigOption('Missing source path.')

    self._source_path = os.path.abspath(self._source_path)
428145
public boolean compile(final Map<String, String> sources, final String... options) {
		final Set<StringSourceFileObject> compUnit = sources.entrySet().stream().map(entry -> new StringSourceFileObject(entry.getKey(), entry.getValue())).collect(Collectors.toSet());
		return compile(compUnit, options);
	}
1267828
private void processOptions(OptionSet options) {
    Pseudorandom.get().setSeed(options.valueOf(randomSeed));

    if (opts.contains(CommonOptions.MAP_REDUCE)) {
      MapReduceConfiguration.setMapReduceExecutor(new LocalMapReduceExecutor(
          options.valueOf(mrMaxThreads), options.valueOf(mrMaxBatchesPerThread)));
    }

    if (opts.contains(CommonOptions.STOCHASTIC_GRADIENT) || opts.contains(CommonOptions.LBFGS)) {
      LogFunction log = null;
      if (parsedOptions.has(logBrief)) {
        log = new NullLogFunction();
      } else {
         log = new DefaultLogFunction(parsedOptions.valueOf(logInterval), false,
             options.valueOf(logParametersInterval), options.valueOf(logParametersDir));
      }
      LogFunctions.setLogFunction(log);
    }
  }
332297
function init(options) {
  var debug = require('../debug').spawn('init');

  function sourceMapInit(file, encoding, callback) {
    // pass through if file is null or already has a source map
    if (file.isNull() || file.sourceMap) {
      this.push(file);
      return callback();
    }

    if (file.isStream()) {
      return callback(new Error(utils.PLUGIN_NAME + '-init: Streaming not supported'));
    }

    if (options === undefined) {
      options = {};
    }
    debug(function() {
      return options;
    });

    var fileContent = file.contents.toString();
    var sourceMap, preExistingComment;
    var internals = initInternals(options, file, fileContent);

    if (options.loadMaps) {
      var result = internals.loadMaps();
      sourceMap = result.map;
      fileContent = result.content;
      preExistingComment = result.preExistingComment;
    }

    if (!sourceMap && options.identityMap) {
      debug(function() { return '**identityMap option is deprecated, update to use sourcemap.identityMap stream**'; });
      debug(function() {
        return 'identityMap';
      });
      var fileType = path.extname(file.path);
      var source = unixStylePath(file.relative);
      var generator = new SourceMapGenerator({ file: source });

      if (fileType === '.js') {
        var tokenizer = acorn.tokenizer(fileContent, { locations: true });
        while (true) {
          var token = tokenizer.getToken();
          if (token.type.label === 'eof') {
            break;
          }
          var mapping = {
            original: token.loc.start,
            generated: token.loc.start,
            source: source,
          };
          if (token.type.label === 'name') {
            mapping.name = token.value;
          }
          generator.addMapping(mapping);
        }
        generator.setSourceContent(source, fileContent);
        sourceMap = generator.toJSON();
      } else if (fileType === '.css') {
        debug('css');
        var ast = css.parse(fileContent, { silent: true });
        debug(function() {
          return ast;
        });
        var registerTokens = function(ast) {
          if (ast.position) {
            generator.addMapping({ original: ast.position.start, generated: ast.position.start, source: source });
          }

          function logAst(key, ast) {
            debug(function() {
              return 'key: ' + key;
            });
            debug(function() {
              return ast[key];
            });
          }

          for (var key in ast) {
            logAst(key, ast);
            if (key !== 'position') {
              if (Object.prototype.toString.call(ast[key]) === '[object Object]') {
                registerTokens(ast[key]);
              } else if (Array.isArray(ast[key])) {
                debug(function() {
                  return '@@@@ ast[key] isArray @@@@';
                });
                for (var i = 0; i < ast[key].length; i++) {
                  registerTokens(ast[key][i]);
                }
              }
            }
          }
        };
        registerTokens(ast);
        generator.setSourceContent(source, fileContent);
        sourceMap = generator.toJSON();
      }
    }

    if (!sourceMap) {
      // Make an empty source map
      sourceMap = {
        version: 3,
        names: [],
        mappings: '',
        sources: [unixStylePath(file.relative)],
        sourcesContent: [fileContent],
      };
    } else if (preExistingComment !== null && typeof preExistingComment !== 'undefined') {
      sourceMap.preExistingComment = preExistingComment;
    }

    sourceMap.file = unixStylePath(file.relative);
    file.sourceMap = sourceMap;

    this.push(file);
    callback();
  }

  return through.obj(sourceMapInit);
}
1042952
def process_source(source)
        return source if source.is_a?(String) && source =~ /\n/

        source, _ = engine.fetch_source(source, { :view_path => options[:view_path] })
        source
      end
67558
function merge(object, options, ...sources) {

	/* iterate through all provided sources */
	for(const source of sources) {

		/* retrieve the property names defined on object */
		const propNames = Object.getOwnPropertyNames(source);

		/* recursively merge properties */
		for(const name of propNames) {
			const value = source[name];

			/* skip undefined values */
			if(options && options.skipUndefined && value === undefined) {
				continue;
			}

			/* skip if both values equals */
			if(value === object[name]) {
				continue;
			}

			/* merge based on options */
			if(value && typeof value === "object") {
				if(options && options.arrayConcat && Array.isArray(object[name]) && Array.isArray(value)) {
					object[name] = object[name].concat(value);
					if(options && options.arrayUnique) {
						object[name] = Array.from(new Set(object[name]));
					}
				} else if(Array.isArray(value)) {
					object[name] = options && options.overwrite || object[name] === undefined ? value : object[name];
				} else {
					object[name] = merge(object[name] || {}, options, value);
				}
			} else {
				object[name] = options && options.overwrite || object[name] === undefined ? value : object[name];
			}

		}

	}

	/* return merged object */
	return object;
}
1023553
function(paths, options) {

      options = options || { };
      this.paths = paths || [ ];

      for (var i = this.paths.length; i--; ) {
        this.paths[i].group = this;
      }

      this.setOptions(options);
      this.setCoords();

      if (options.sourcePath) {
        this.setSourcePath(options.sourcePath);
      }
    }
1213285
def compile(source, options = {})
      source  = prepare_source(source)
      options = prepare_options(options)
      command = ["node", "--eval"]
      command.push compilation_snippet \
        method:    "compile#{ "Client" if options[:client] }",
        arguments: [source, options],
        locals:    options.fetch(:locals, {}),
        options:   options
      stdout, stderr, exit_status = Open3.capture3(*command)
      raise engine::CompilationError, stderr unless exit_status.success?
      process_result(source, stdout, options)
    end
1075280
function postProcessing(tokens, options, source){

  function tokenName(token){
    return (token.prefix ? token.prefix + ':' : '') + token.name;
  }

  function getTokenAttrs(token){
    return token.attrs.reduce(function(res, attr){
      res[tokenName(attr)] = attr.value;
      return res;
    }, {});
  }

  function buildLocationIndex(){
    var line = 1;
    var column = 0;

    lineIdx = new Array(source.length);
    columnIdx = new Array(source.length);

    for (var i = 0; i < source.length + 1; i++)
    {
      lineIdx[i] = line;
      columnIdx[i] = column;

      if (source[i] === '\n')
      {
        line++;
        column = 0;
      }
      else
        column++;
    }
  }


  function findLocationByOffset(offset){
    return {
      line: lineIdx[offset],
      column: columnIdx[offset]
    };
  }

  function getLocationFromRange(range){
    return {
      start: findLocationByOffset(range.start_),
      end: findLocationByOffset(range.end_)
    };
  }

  function convertRange(token){
    if (options.loc)
    {
      token.loc = getLocationFromRange(token.range);
      if (token.valueRange)
        token.valueLoc = getLocationFromRange(token.valueRange);
    }

    if (options.range)
    {
      token.range = [token.range.start_, token.range.end_];
      if (token.valueRange)
        token.valueRange = [token.valueRange.start_, token.valueRange.end_];
    }
    else
    {
      delete token.range;
      delete token.valueRange;
    }
  }

  function walk(tokens){
    var token;
    var prev;

    for (var i = 0; token = tokens[i++]; prev = token)
    {
      // process element
      if (token.type == TYPE_ELEMENT)
      {
        // process attribute content
        var attrs = getTokenAttrs(token);
        for (var j = 0, attr; attr = token.attrs[j++];)
        {
          var mode = attr.name;

          // special case modification instruction in <b:include>
          if (token.prefix == 'b' && attr.name == 'value')
          {
            // parse value attribute in
            //   <b:class>/<b:append-class>/<b:set-class>/<b:remove-class>
            //   <b:attr name="name">/<b:append-attr name="name">/<b:set-attr name="name">/<b:remove-attr name="name">
            var m = token.name.match(ATTRIBUTE_MODE);
            if (m)
              mode = m[1] == 'class' ? 'class' : attrs.name;
          }

          // process bindings and decode HTML tokens
          processAttr(attr, mode, convertRange);

          convertRange(attr);
        }

        // walk recursive
        walk(token.children);
      }

      // process text
      if (token.type == TYPE_TEXT)
      {
        // decode HTML tokens in value
        token.value = decodeHTMLTokens(token.value);

        // try join text tokens
        if (!token.refs && prev && prev.type == TYPE_TEXT && !prev.refs)
        {
          prev.value += token.value;
          prev.end_ = token.end_;
          tokens.splice(--i, 1);
        }
      }

      // process comment
      if (token.type == TYPE_COMMENT)
      {
        // decode HTML tokens in value
        token.value = decodeHTMLTokens(token.value);
      }

      convertRange(token);
    }
  }

  var lineIdx;
  var columnIdx;

  if (options.loc)
    buildLocationIndex();

  walk(tokens);
}
1024901
function removeEmptySources (sources) {
    return _.reject(sources, function (obj) {
        return _.isEmpty(obj.transformed);
    });
}