Reputation: 2055
I have an Angular 2 application in which i wish to use gulp to concat som libary files.
My task for just that look as follows:
This produces a JS file and i reference it in my index.html:
Now when i run this i get the following:
and as we all know, there a no such thing as interfaces in js i must be dealing with typescript.
Can someone please tell me how to convert the typescript files in my libraries to js?
Upvotes: 2
Views: 266
Reputation: 31600
The rxjs/** and @angular/** lines in the gulp.src task will result in all the files in those folders being concatenated. That means the .ts and .d.ts files in those folders as well.
You should change those lines to include only the javascript files.
For example:
rxjs/**/*.js
@angular/**/*.js
That should result in only javascript files being included.
Upvotes: 1
Reputation: 41539
Sounds like you're concatenating your ts source files into all.js, instead of the compiled js output from that ts.
It's not clear from the given example what you are using to do this, but you may need to add gulp-typescript to your gulp pipeline.
Upvotes: 0