docs: function preprocessInputText(inputText, currentDirectory) {
    var processDirectory = process.cwd(),
        importedFilePaths = [];
  
    // If the file name is an absolute path, returns it normailzed. If it is
    // a relative path starting with "./" or "../", appends it to the path
    // of the parent file, which the specified file is being expanded to.
    // Otherwise the relative path is  appended to the current directory.
    function completeFilePath(fileName, currentDirectory) {
      var directory;
      if (!path.isAbsolute(fileName)) {
        fileName = fileName.replace(/\\/g, '/');
        if (fileName.indexOf('./') === 0 ||
            fileName.indexOf('../') === 0) {
          directory = currentDirectory;
        } else {
          directory = processDirectory;
        }
        fileName = path.join(directory, fileName);
      }
      return path.resolve(path.normalize(fileName));
    }
  
    function expandFileImports(inputText, currentDirectory) {
      return inputText.replace(/#import: *(.*)/g, function (all, fileName) {
        fileName = completeFilePath(fileName, currentDirectory);
        if (importedFilePaths.indexOf(fileName) >= 0) {
          return '';
        }
        importedFilePaths.push(fileName);
        return expandFileImports(
            fs.readFileSync(fileName, {encoding: 'utf8'}),
            path.dirname(fileName));
      });
    }
  
    return expandFileImports(inputText, currentDirectory || processDirectory);
  }