gulp-dos2unix-js
Version:
Gulp plug-in to convert DOS to Unix line endings (pure JS)
35 lines (25 loc) • 1.58 kB
Markdown
### gulp-dos2unix
> :tropical_drink: Gulp plug-in to convert DOS (\r\n) to Unix (\n) line endings using pure JS module.
[](https://travis-ci.org/stpettersens/gulp-dos2unix-js)
[](https://github.com/feross/standard)
[](http://npmjs.com/package/gulp-dos2unix)
[](https://david-dm.org/stpettersens/gulp-dos2unix-js) [](https://david-dm.org/stpettersens/gulp-dos2unix-js#info=devDependencies)
##### Install:
$ npm install --save-dev gulp-dos2unix-js
##### Usage:
```js
'use strict'
const gulp = require('gulp')
const dos2unix = require('gulp-dos2unix-js')
gulp.task('default', function () {
return gulp.src(['README.md', 'LICENSE'])
.pipe(dos2unix()) // This defaults to {feedback: false, write: false}
.pipe(gulp.dest('out'))
})
```
##### Options:
Omittable options object with following allowable parameters
(same as [ssp-dos2unix-js](http://github.com/stpettersens/ssp-dos2unix-js)):
* `feedback` (Boolean) - Display feedback (*"File already has UNIX line endings..."*).
* `writable` (Boolean) - Write change to file rather than pipe through to copy.
All options are false if omitted.