gulp-source-url

Source URLs for files run though with gulp

Usage no npm install needed!

<script type="module">
  import gulpSourceUrl from 'https://cdn.skypack.dev/gulp-source-url';
</script>

README

gulp-source-url

Add sourceUrl comments to gulp files. Useful for things like gulp-concat and gulp-surgeon.

Example

var sourceUrls = require('gulp-source-urls');

gulp.src('./lib/*.js')
  .pipe(sourceUrls())
  .pipe(concat('out.js'))
  .pipe(gulp.dest('public/'))

Configuring

Relative Paths

You can optionally pass a path in, in which case the paths will be relative that path. For example:

var sourceUrls = require('gulp-source-urls');

gulp.src('./lib/**/*.js')
  .pipe(sourceUrls('./lib'))
  .pipe(concat('out.js'))
  .pipe(gulp.dest('public/'))