Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

gulp-source-url

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-source-url

Source URLs for files run though with gulp

npmnpm
Version
0.1.1
Version published
Weekly downloads
46
-24.59%
Maintainers
1
Weekly downloads
 
Created
Source

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/'))

You can also request that the eval for the JS be run in an anonymous function. This can help avoid global namespace variable pollution.

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

gulp.src('./lib/**/*.js')
  .pipe(sourceUrls('./lib', {anonymous: true}))
  .pipe(concat('out.js'))
  .pipe(gulp.dest('public/'))

Keywords

gulp

FAQs

Package last updated on 31 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts