gulp-ext

> File extension utility

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
gulp-ext
1.0.010 years ago10 years agoMinified + gzip package size for gulp-ext in KB

Readme

File extension utility

Help replace / crop / append file extensions.

Install

$ npm install --save-dev gulp-ext

Usage

var gulp = require('gulp');
var ext = require('gulp-ext');

gulp.task('default', function () {
	return gulp.src('src/app.json')
		.pipe(ext.append('bak'))
		.pipe(gulp.dest('dist'));
});

API

ext.append(extension)

Type: String
Default: undefined
Appends extension.

ext.crop(extension)

Removes only extension, that passed as first argument. If not - crops any extension (app.ext.bak -> app.ext).

ext.replace(extension, pattern)

Replaces whole extension on extension argument or only matching pattern.

License

MIT © Vsevolod Strukchinsky