Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

gulp-eol-enforce

1.0.0 • Public • Published

gulp-eol-enforce

status npm version dependencies license downloads

Checks line endings to ensure they're the proper type. This plugin will fail if undesired line endings are found. Particularly useful as a pre-commit hook.

Usage

eol(desiredNewLine)

desiredNewLine can be one of the following strings:

  • "\n"
  • "\r\n"
  • "\r"

This parameter defaults to your platform's default line ending (os.EOL).

Use this in your Gulpfile.js like so:

var eol = require('gulp-eol-enforce');
 
gulp.task('eol', function () {
  return gulp.src(['src/**/*.{css,js}'])
    .pipe(eol('\n'));
});

Example output:

Automatic Correction

This plugin does not automatically fix line endings - use gulp-eol or gulp-line-ending-corrector instead.

Install

npm i gulp-eol-enforce

DownloadsWeekly Downloads

285

Version

1.0.0

License

MIT

Unpacked Size

18.1 kB

Total Files

9

Last publish

Collaborators

  • avatar