Socket
Book a DemoInstallSign in
Socket

gulp-slash

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-slash

Convert gulp file paths using slash.

latest
Source
npmnpm
Version
1.1.3
Version published
Maintainers
1
Created
Source

gulp-slash

Apply slash to gulp file paths.

Install

Install with npm.

npm install --save-dev gulp-slash

Usage

When used without arguments it returns an object stream for use with Gulp. The stream converts (in-place) the path, base, cwd properties in each vinyl file.

var gulp = require('gulp');
var gulpSlash = require('gulp-slash');

gulp.task('default', function () {
	return gulp.src('js/**/*.js')
		.pipe(gulpSlash())
		/* ... do work here ... */
});

When used with string argument, it acts per slash.

var gulpSlash = require('gulp-slash');
gulpSlash('c:\windows\file\path');  // c:/windows/file/path

When used with an object argument, it presumes the object is a vinyl file as used by Gulp. In converts (in-place) the path, base, cwd properties of the given object.

var gutil = require('gulp-util');
var gulpSlash = require('gulp-slash');
var file = new gutil.File();
...
var sameFile = gulpSlash(file);

Keywords

gulpplugin

FAQs

Package last updated on 29 Jul 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