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

Does gulp-typescript support the --emitDecoratorMetadata compiler option #100

Closed
ifyio opened this issue May 1, 2015 · 4 comments
Closed

Comments

@ifyio
Copy link

ifyio commented May 1, 2015

Does gulp-typescript support the --emitDecoratorMetadata compiler option of typescript 1.5.0-beta (http://blogs.msdn.com/b/typescript/archive/2015/04/30/announcing-typescript-1-5-beta.aspx)

@ivogabe
Copy link
Owner

ivogabe commented May 1, 2015

Yes, you can use emitDecoratorMetadata: true as an option.

@ivogabe ivogabe closed this as completed in a57abff May 1, 2015
@ifyio
Copy link
Author

ifyio commented May 1, 2015

Ok I'm currently using it like so...

gulp.task('build-ts', [], function() {

  return gulp.src(paths.typescript)
    .pipe(plumber())
    .pipe(changed(paths.output, {extension: '.js'}))
    .pipe(sourcemaps.init())
    .pipe(ts({
      declarationFiles: false,
      noExternalResolve: true,
      target: 'es5',
      module: 'commonjs',
      emitDecoratorMetadata: true,
      typescript: typescript
    }))
    .pipe(sourcemaps.write())
    .pipe(gulp.dest(paths.output));
});

Is this expected to work?

@ivogabe
Copy link
Owner

ivogabe commented May 1, 2015

Yes (provided that you've installed typescript@1.5.0-beta), except that you can't use gulp-changed with gulp-typescript, since typescript needs to have all files, it needs them for type info.

@ifyio
Copy link
Author

ifyio commented May 1, 2015

I see. Ok thanks.

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