-
Notifications
You must be signed in to change notification settings - Fork 129
Sometimes gulp-typescript doesn't generate any files when using typescript@next #223
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
Comments
With the included TS 1.6.2, works fine. I would see the "dist" directory being generated. But with the typescript@next, it wouldn't generate anything. Strange thing is: if I renamed my importanceType.ts to bar.ts, it would generate it fine. I am very confused as to why the name of the file / module would make gulp-typescript work / not work. Just to give more details, I have my directory structure as such:
my gulpfile.js is var gulp = require('gulp');
var ts = require('gulp-typescript');
gulp.task('default', function () {
return gulp.src('src/**/*.ts')
.pipe(ts({
typescript: require('typescript'),
"target": "ES5",
"module": "commonjs",
"jsx": "react",
"sourceMap": true,
"experimentalDecorators": true,
"declaration": true,
"removeComments": true
}))
.pipe(gulp.dest('dist'));
}); my importanceType.ts enum importanceType {
Low = 0,
Normal = 1,
High = 2
};
export default importanceType; |
Thanks for reporting, I'll take a look at this. Can you also run the |
tsc works fine in the command line. My tsc is pegged at @1.8.0-dev.20151028 |
Forgot to type in foo.ts contents: import importanceType from './importanceType' |
Doing some sleuthing and debugging. Seems like the input.ts's commonSourceDirectory is getting this for fileNames: Array[4] where as [email protected] gives this: 0:"E:\workspace\testmodules-backup\packages\foo\src\foo.ts" Something went wonky with the input.ts |
I think I might have a fix: the problem is that ts@next started passing in relative paths to the getSourceFile in the compiler host. You need to simulate the behavior for [email protected]+... I'll work up a PR for you I think to fix this. |
This seems related to microsoft/TypeScript#5455 |
@kenotron seems right, tsc runs fine for me, 1028 and 1029 have the same issue. |
Looks like the old behavior has been reverted in microsoft/TypeScript#5462. @kenotron does using the latest TypeScript build solve this issue? |
So, by not doing anything, you have dodged a bullet there :) Yes I think this is fixed with typescript@next. |
Now Typescript at 1.8.0-dev.20151028, with gulp-typescript, I've been able to repro a bug where gulp-typescript just doesn't output anything.
The text was updated successfully, but these errors were encountered: