Perhaps this isn't exactly what you were looking for, but it offers a way to achieve the same outcome. Hopefully, you find it helpful. To start, refer to the documentation here , which explains how to integrate gulp in VS2015. Next, ensure your tsconfig.json file includes TypeScript compiler options similar to the following:
//tsconfig.json
{
"compilerOptions": {
"target": "ES6",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"module": "commonjs",
"noImplicitAny": false,
"removeComments": true,
"preserveConstEnums": true
},
"exclude": [
".vscode",
"node_modules",
"typings",
"public"
]
}
Lastly, consider using a gulpfile like the one below - adapted from one of my own projects - to transpile ES6 to ES5:
// gulpfile.js
'use strict';
var gulp = require("gulp"),
ts = require("gulp-typescript"),
babel = require("gulp-babel");
var tsSrc = [
'**/*.ts',
'!./node_modules/**',
'!./typings/**',
'!./vscode/**',
'!./public/**'
];
gulp.task("ts-babel", function () {
var tsProject = ts.createProject('tsconfig.json');
return gulp.src(tsSrc)
.pipe(tsProject())
.pipe(babel({
presets: ['es2015'],
plugins: [
'transform-runtime'
]
}))
.pipe(gulp.dest((function (f) { return f.base; })));
});
You can now transpile files by running the command gulp ts-babel. Remember to install necessary npm packages like babel-preset-es2015 and babel-plugin-transform-runtime.
Update: Special thanks to Ashok M A for pointing out the correction needed. Changed pipe(ts()) to pipe(tsProject())