Created
May 4, 2016 08:31
-
-
Save syamn/c7a954193c9d4ebe679bbba95de81304 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var Elixir = require('laravel-elixir'); | |
var ts = require('gulp-typescript'); | |
var concat = require('gulp-concat'); | |
var _ = require('underscore'); | |
// Laravel Elixir Reporter | |
var _laravelReporter = require('./reporter'); | |
Elixir.extend('typescript', function(output, dest, options) { | |
var search = '**/*.+(ts)'; | |
options = _.extend({ | |
sortOutput: true | |
}, options); | |
new Elixir.Task('typescript', function() { | |
var tsResult = gulp.src('./resources/assets/typescript/**/*.ts') | |
.pipe(ts(options, undefined, _laravelReporter.ElixirMessage())); | |
return tsResult | |
.pipe(concat(output)) | |
.pipe(gulp.dest(dest || './public/js')) | |
}) | |
.watch(Elixir.config.assetsDir + 'typescript' + '/' + search); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Recommendation: https://github.com/okaufmann/laravel-elixir-typescript