JSPM

gulp-extname

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4211
  • Score
    100M100P100Q122177F

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

Package Exports

  • gulp-extname

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-extname) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

gulp-extname NPM version

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

Install

Install with npm

npm i gulp-extname --save

Run tests

npm test

Usage

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

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

Explicitly pass an extension to use:

ext('.foo')
// or
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.

Contributing

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

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert
Released under the MIT license


This file was generated by verb on November 13, 2014.