Open AbhilashThomas opened 7 years ago
You can do something like
var gulp = require('../node_modules/gulp');
var ts = require('../node_modules/gulp-typescript');
var tsConfigPath = './src/tsconfig.json';
var tsProject = ts.createProject(tsConfigPath);
var tsResult = tsProject.src()
.pipe(tsProject());
tsResult.js.pipe(inlineNg2Template({ useRelativePaths: true}))
.pipe(gulp.dest("./"));
The last paragraph of gulp-typescript's basic usage section in the readme highlights scenarios like this.
`var gulp = require('../node_modules/gulp');
var ts = require('../node_modules/gulp-typescript'); var tsConfigPath = './src/tsconfig.json'; var tsProject = ts.createProject(tsConfigPath); var tsResult = tsProject.src() .pipe(inlineNg2Template({ useRelativePaths: true})) .pipe(tsProject());`
With above code, the templateUrl doesn't change. Can we use tsProject.src() ?