Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including elixir-typescript-angular2 with all npm packages installed. Try it out:

var elixirTypescriptAngular2 = require("elixir-typescript-angular2")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

elixir-typescript-angular2 v2.0.1

Laravel Elixir Typescript Compiler Extension for Angular 2


(forked from laravel-elixir-typescript by MikeyAlder) (forked from laravel-elixir-typescript by okaufmann)


You have to install Laravel's Elixir(Version 3.0 or higher) and its dependencies first.


The signature was changed to the following:

mix.typescript(src, output, options);


Install with Node.js

npm install elixir-typescript --save


A simple gulp-typescript wrapper ingredient for Laravel Elixir.

Add it to your Elixir-enhanced Gulpfile, like so:

var elixir = require('laravel-elixir');

// import the dependency
var elixirTypscript = require('elixir-typescript');

elixir(function(mix) {

This will compile the app.ts file in resources/assets/typescript/ and concat the compiled content into public/js/app.js.

If you'd like to output to a different directory than the default public/js, then you may override this by provide a path for output as well.

mix.typescript('app.js', 'public/js/foo/bar.js');

Further you could insert multiple files like

elixir(function(mix) {
  mix.typescript(['module1.ts', 'module2.ts']);


The project file is also supported. Just put your file into the typescript asset folder and the pluging will automatically use it.


Bellow is the list of the available parameters:

  • src: Filename for output
  • output(optional): Where to place the output file. Default: public/js/
  • options (optional): Options to forward to the gulp-typescript used for compiling. All options under
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free