These are chat archives for TypeStrong/atom-typescript

8th
May 2015
Basarat Ali Syed
@basarat
May 08 2015 00:32

any idea when the next update from master might be

I'll update it today. Will add systemjs and umd as valid module options for tsconfig as well. Will notify once done

Basarat Ali Syed
@basarat
May 08 2015 02:21
@cmichaelgraham atom-typescript is now back to master:rose: you should already be able to use your build tool to point to whatever tsc.js you want (supported by both grunt-ts and gulp-typescript)
Micah Zoltu
@MicahZoltu
May 08 2015 03:40
So if I do an update I can emit system?
Nevermind, forgot I was waiting for system support in gulp-typescript, not Atom. :P
Basarat Ali Syed
@basarat
May 08 2015 03:41
:rose:
Nelo Mitranim
@Mitranim
May 08 2015 06:02
@Zoltu Hmm gulp-typescript lets you specify a custom version of typescript. If the transpiler supports systemjs modules, you should already be able to use this feature
Mike Graham
@cmichaelgraham
May 08 2015 08:36
:point_up: @basarat rocks !!
Nelo Mitranim
@Mitranim
May 08 2015 11:47
Hmm can someone please clarify, does TS already support emitting system modules?
Mike Graham
@cmichaelgraham
May 08 2015 11:49
system and umd are in ts 1.5.2. it looks like its about half way done :) https://github.com/microsoft/TypeScript/milestones
but since the atom-typescript package is pulling from the typescript master, you can use it now :)
just make sure you have the latest version. let me know if you need help verifying or installing the latest version :)
Nelo Mitranim
@Mitranim
May 08 2015 11:55
Hmm good to know, thanks. We're building with gulp so it's just a matter of specifying the right dependency
Mike Graham
@cmichaelgraham
May 08 2015 11:56
did you get gulp-typescript to work specifying tsproject.json and the typescript dependency?
Nelo Mitranim
@Mitranim
May 08 2015 11:57
yeah
Mike Graham
@cmichaelgraham
May 08 2015 11:57
would you mind sharing your gulp task that does that?
Nelo Mitranim
@Mitranim
May 08 2015 11:57
we had to include a few extra options to make it work
gulp.task('ts:compile', function() {
    var tsProject = ts.createProject('tsconfig.json');

    return tsProject.src()
        .pipe($.plumber())
        .pipe(ts({
            declarationFiles: true,
            noExternalResolve: true,
            typescript: require('typescript'),
            target: 'ES5',
            module: 'commonjs'
        }))
        .pipe(gulp.dest(paths.out));
});
Mike Graham
@cmichaelgraham
May 08 2015 12:00
cool, thanks :)
Nelo Mitranim
@Mitranim
May 08 2015 12:54
Turns out you have to hack gulp-typescript to make it work with the {module: 'system'} option (otherwise it won't let it through to the compiler)
just updating the typescript version in its own package.json is enough