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

module.exports = function(newTS
) {
  return gulp.src('src/index.ts')
   .pipe(sourcemaps.init())
   .pipe(sourcemaps.write('./'))
   .pipe(gulp.dest('dist/'));
};

A:

You can use the gulp