Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-extname

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-extname

gulp plugin to dynamically rewrite dest extensions based on src extensions.

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gulp-extname NPM version Build Status

gulp plugin to dynamically rewrite dest extensions based on src extensions.

(TOC generated by verb using markdown-toc)

Install

Install with npm:

$ npm i gulp-extname --save

Usage

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

gulp.task('default', function() {
  gulp.src('styles.less')
    .pipe(extname())
    .pipe(gulp.dest('dist/css'));
    //=> dist/css/styles.css
});

Define extension

Explicitly pass an extension to use. Any of these will work:

.pipe(extname('.foo'))

// or
.pipe(extname('foo'))

// or
.pipe(extname({ext: 'foo'}))

Extension mappings

The following extensions are mapped automatically:

// html
.md    //=> .html
.hbs   //=> .html
.swig  //=> .html
.tmpl  //=> .html
.html  //=> .html
.htm   //=> .html

// css
.less  //=> .css
.styl  //=> .css
.sass  //=> .css
.scss  //=> .css
.css   //=> .css

// js
.coffee//=> .js
.js    //=> .js

Add extension mappings, or use rewrite-ext for non-gulp projects.

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2016 Jon Schlinkert Released under the MIT license.


This file was generated by verb on January 06, 2016.

Keywords

FAQs

Package last updated on 06 Jan 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc