Returns GNU style source

@param {Object} source
186590
function sourceString(source) {
  var message = "<css input>"
  if (source) {
    if (source.input && source.input.file) {
      message = source.input.file
    }
    if (source.start) {
      message += ":" + source.start.line + ":" + source.start.column
    }
  }

  return message
}
26908
function preprocessSourceMap(sourceMap) {
      if (typeof sourceMap === 'string') {
        sourceMap = JSON.parse(sourceMap);
      }
      if (sourceMap && Array.isArray(sourceMap.sources)) {
        sourceMap.sources = sourceMap.sources.map(sourceUrl =>
          urlTools.resolveUrl(assetGraph.root, sourceUrl.replace(/^\//, ''))
        );
      }
      return sourceMap;
    }
262140
def update_source!(source)
      # e.g. /\[%\s+javascript\s+((\S+)\s?(\S+))\s+%\]/
      regex = /
        #{Regexp.escape options[:src_pre]}
        \s+#{type.to_s.singularize}
        \s+((\S+)\s?(\S+))\s+
        #{Regexp.escape options[:src_post]}
      /x
      source.gsub! regex do
        if Regexp.last_match[2] == options[:inline]
          assets[Regexp.last_match[3]].to_s
        else
          asset = write Regexp.last_match[1]

          # @todo Raise warning or error if asset not found.
          p "asset not found: #{Regexp.last_match[1]}" && next if asset.nil?

          "#{options[:cdn]}#{format_path asset}"
        end
      end
      true
    end
1089754
function getJsSource(chunk, jsName) {
  let jsSource;
  for (let i = 0, ii = chunk.modules.length; i < ii; ++i) {
    const module = chunk.modules[i];
    if (module.modules) {
      jsSource = getJsSource(module, jsName);
      if (jsSource) {
        return jsSource;
      }
    }
    if (module.identifier.endsWith(jsName) && module.source) {
      return module.source;
    }
  }
}
1084715
function lint() {
    return gulp.src(srcDir + '**/*.js')
        .pipe($$.excludeGitignore())
        .pipe($$.eslint())
        .pipe($$.eslint.format())
        .pipe($$.eslint.failAfterError());
}
569829
function gnuMessage(message, source) {
  return (source ? (source.file ? source.file : "<css input>") + ":" + source.start.line + ":" + source.start.column : "") + " " + message
}
365651
function(options) {
    if (config.sourcemaps) {
        options = _.defaults(
            options,
            { devtool: '#source-map' }
        );
    }

    if (config.production) {
        var currPlugins = _.isArray(options.plugins) ? options.plugins : [];
        options.plugins = currPlugins.concat([new UglifyJsPlugin({ sourceMap: false })]);
    }

    return options;
}
802876
function format(source) {

        var ast = UglifyJS.parse(source);

        return ast.print_to_string({
            beautify: true,
            comments: 'all'
        });

    }
966021
function getPadding(source, html) {
  const re = new RegExp(`^([\\t ]+)${escape(source)}`, 'gm');
  const match = re.exec(html);

  return match ? match[1] : '';
}
804952
function readSource(src) {
      var cwd = path.dirname(file.path);
      if (options.assetsDirs && options.assetsDirs.length) {
        var basename = path.basename(cwd);
        if (options.assetsDirs.indexOf(basename) === -1) {
          options.assetsDirs.unshift(path.basename(cwd));
        }
        src = path.join(options.assetsDirs.length > 1 ? '{' + options.assetsDirs.join(',') + '}' : options.assetsDirs[0], src);
        cwd = path.dirname(cwd);
      }
      var match = glob.sync(src, {cwd: cwd});
      if (!match.length) return next(new PluginError('gulp-nginclude', 'File "' + src + '" not found'));
      return fs.readFileSync(path.join(cwd, match[0])).toString();
    }
1035221
function lintJS(src, dest) {
  dest = dest || config.src.jsPath;

  return gulp.src(src)
    .pipe(eslint({
      fix: true
    }))
    .pipe(eslint.format())
    .pipe(isFixed(dest));
}
1183715
function CSSPluginBase(compileCSS) {
  this.compileCSS = compileCSS;

  this.translate = function(load, opts) {
    var loader = this;
    if (loader.builder && loader.buildCSS === false) {
      load.metadata.build = false;
      return;
    }

    var path = this._nodeRequire && this._nodeRequire('path');

    return Promise.resolve(compileCSS.call(loader, load.source, load.address, load.metadata.loaderOptions || {}))
    .then(function(result) {
      load.metadata.style = result.css;
      load.metadata.styleSourceMap = result.map;
      if (result.moduleFormat)
        load.metadata.format = result.moduleFormat;
      return result.moduleSource || '';
    });
  };
}
795391
function Loader(source) {
    const query = this.query ? JSON.parse(this.query.replace(/^\?/, '')) : {
        exportFormat: 'exports.locals = ',  // use CSS module export format by default
    };
    this.cacheable();
    return source + "\n" + query.exportFormat + JSON.stringify(getFileJSON(this.resourcePath)) + ';';
}
923558
function getSourceMappingURL() {
	if (path.extname(argv.output) === '.css') {
		return `\n/*# sourceMappingURL=${path.basename(argv.output)}.map */`;
	}
	return `\n//# sourceMappingURL=${path.basename(argv.output)}.map`;
}
274548
function genPugSourceMap (filename, compiled, options) {
  options = options || {}

  const basedir = options.root ? path.resolve(path.normalize(options.root)) : process.cwd()
  filename = path.resolve(basedir, path.normalize(filename))

  const reLineAndPath = /;pug_debug_line = ([0-9]+);pug_debug_filename = "([^"]*)";/
  const reEntryPoint  = /^function [$\w]+\(locals\)\{var pug_html\s*=/
  const compiledLines = compiled.split('\n')
  const debugSources  = extractSources(compiledLines)
  const matchedFiles  = {}
  let lineCount = 0
  let lastLine = -1

  if (!debugSources) {
    throw new Error('Cannot get the source code. Please compile with compileDebug:true.')
  }

  const mapGenerator = new SourceMapGenerator({
    file: relative(basedir, filename) + '.js',
  })

  // allow breakpoints in 1st line, better support is in To Do
  if (reEntryPoint.test(compiledLines[0])) {
    mapGenerator.addMapping({
      generated: { line: 1, column: 0 },
      original: { line: 1, column: 0 },
      source: relative(basedir, filename),
    })
  }

  compiledLines.forEach((line, lineno) => {
    lineCount++

    const match = line.match(reLineAndPath)
    if (!match) {
      return
    }

    const originalLine = ~~match[1]
    if (originalLine <= 0) {
      return
    }

    // avoid normalize the path here to match the name in debugSources
    const fname = match[2] && match[2].replace(/\\u002F/g, '/').replace(/\\\\/g, '\\') || filename

    let matchedLines = matchedFiles[fname]
    if (!matchedLines) {
      // new included file - add source content
      matchedFiles[fname] = matchedLines = []

      if (!options.excludeContent) {
        addSourceContent(mapGenerator, basedir, fname, debugSources)
      }
    }

    // remove pug debug line from generated code, adjust line counter
    if (!options.keepDebugLines) {
      const len = match[0].length

      compiledLines[lineno] = line.length === len
        ? '' : line.slice(0, match.index) + line.slice(match.index + len)
      if (!compiledLines[lineno].trim()) {
        compiledLines[lineno] = '\0'
        lineCount--
      }
    }

    // have a recognized generated line?
    if (!/^;pug_debug/.test(compiledLines[lineno + 1])) {
      let generatedLine = lineCount + 1

      lastLine = lineno + 1
      if (compiledLines[lastLine].slice(0, 2) === '//' &&
          compiledLines[lastLine + 1] === ';(function(){') {
        generatedLine++
        lastLine++
      }

      // adds the new mapping if line is not matched yet
      if (matchedLines.indexOf(originalLine) < 0) {
        matchedLines.push(originalLine)
        mapGenerator.addMapping({
          generated: {
            line: generatedLine,
            column: 0,
          },
          original: {
            line: originalLine,
            column: 0,
          },
          source: relative(basedir, fname),
        })
      }
    }
  })

  // use the resulting non-empty lines to recreate the code
  if (!options.keepDebugLines) {

    // split the last row having the root catch clause
    if (~lastLine) {
      const line = compiledLines[lastLine]
      const pos = line.lastIndexOf(';}.call(this,') + 1
      if (pos && line.lastIndexOf('rethrow(err,') > pos) {
        compiledLines[lastLine] = line.slice(0, pos) + '\n' + line.slice(pos)
      }
    }

    compiled = compiledLines.filter((line) => line !== '\0').join('\n')
  }

  return { data: compiled, map: mapGenerator.toJSON() }
}
1101432
function stylesheet(config = {}) {
	const minifier = new cleancss();
	const styles = [];

	return {
		name: 'stylesheet',
		transform(code, id) {
			// Note that 'id' can be mapped to a CJS proxy import, in which case
			// 'id' will start with 'commonjs-proxy', so let's first check if we
			// are importing an existing css file (i.e. startsWith()).
			if (!id.startsWith(path.resolve('.')) || !id.endsWith('.css')) {
				return;
			}

			if (config.minify) {
				code = minifier.minify(code).styles;
			}

			// keep track of all imported stylesheets (already minified)
			styles.push(code);

			return {
				code: 'export default ' + JSON.stringify(code)
			};
		},
		generateBundle(opts, bundle) {
			if (!config.extract) {
				return;
			}

			const entry = Object.keys(bundle).find(v => bundle[v].isEntry);
			const name = (entry || '').replace(/\.js$/i, '.css');
			if (!name) {
				this.error('failed to guess the output file name');
			}

			bundle[name] = {
				code: styles.filter(v => !!v).join('')
			};
		}
	};
}
886481
function getIncludeFiles(glob) {

    var folders = settings.folders;

    var options = {
      read: false,
      cwd: path.resolve(folders.dest + '/' + folders.vendor)
    };

    return gulp.src(glob, options);

  }