elixir-typescript-compiler

1.0.1 • Public • Published

elixir-typescript-compiler (forked from elixir-typescript by okaufmann, which is forked from laravel-elixir-typescript by MikeyAlder (https://github.com/MikeyAlder/laravel-elixir-typescript)

Prerequirement

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

Installation

Install with Node.js

npm install elixir-typescript-compiler

Usage

A more advanced 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 typescripter = require('elixir-typescript-compiler');

elixir(function(mix) {
  mix.typescript('app.ts', 'app.js');
});

This will compile the source Typescript file app.ts located in your resources/assets/typescript/ folder and output the content into public/js/app.js (or whatever your Laravel public folder location is which can be set in the node_modules/laravel-elixir/Config.js file).

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

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

You can also provide an array of input files which will be compiled into a single file.

mix.typescript(['config.ts', 'app.ts'], 'app.js', 'public/js/foo/bar');

By default, it will look for files in your resources/assets/typescript/ folder. All *.ts files provide in the input array need be relative to this folder. However you can override the default source folder as well.

mix.typescript(['config.ts', 'app.ts'], 'app.js', 'public/js/foo/bar', 'some/source/folder');

The source folder is relative to your Laravel root folder.

Readme

Keywords

none

Package Sidebar

Install

npm i elixir-typescript-compiler

Weekly Downloads

1

Version

1.0.1

License

none

Last publish

Collaborators

  • ishryal