Gulp plugin to ensure consistent end of line characters.
npm install --save-dev @gulp-plugin/eol
const typescript = require('gulp-typescript')
const sourcemaps = require('gulp-sourcemaps')
const eol = require('gulp-plugin/eol')
const project = typescript.createProject('tsconfig.json')
function build() {
src('./src/**/*.ts')
.pipe(eol({ eol: '\n' }))
.pipe(sourcemaps.init())
.pipe(project())
return compiled.js
.pipe(sourcemaps.write({ sourceRoot: file => path.relative(path.join(file.cwd, file.path), file.base) }))
.pipe(dest('build/'))
}