Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to use this plugin with tsProject.src() instead of gulp.src() #84

Open
AbhilashThomas opened this issue Mar 5, 2017 · 1 comment

Comments

@AbhilashThomas
Copy link

`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() ?

@AbhilashThomas AbhilashThomas changed the title Is it possibel to use this plugin with tsProject.src() instead of gulp.src() Is it possible to use this plugin with tsProject.src() instead of gulp.src() Mar 5, 2017
@AHelper
Copy link

AHelper commented Dec 15, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants