Skip to content

Instantly share code, notes, and snippets.

View pwall2222's full-sized avatar

PWall pwall2222

  • 18:47 (UTC +01:00)
View GitHub Profile
@azarus
azarus / gulptask.js
Last active March 7, 2022 20:31
Gulp Task to transform Typescript path imports into relative paths using the tsconfig
// Gulp Task
gulp.task("compile:source", function(done) {
gutil.log(gutil.colors.yellow("[Typescript]"), gutil.colors.magenta('Transpiling Source'));
var tsProject = ts.createProject('tsconfig.json', {
typescript: require('typescript'),
});
gulp.src("source/**/*")
.pipe(tsProject())
.pipe(tsimport(tsProject.config.compilerOptions))