Skip to content

Commit 89761b2

Browse files
committed
Fix: Make watcher work
1 parent 453b69a commit 89761b2

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

index.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
var gulp = require('gulp');
22
var elixir = require('laravel-elixir');
3-
//var Notification = require('laravel-elixir/ingredients/commands/Notification');
43
var ts = require('gulp-typescript');
54
var concat = require('gulp-concat');
65
var _ = require('underscore');
@@ -10,25 +9,22 @@ var _laravelReporter = require('./reporter');
109

1110
var Task = elixir.Task;
1211

13-
elixir.extend('typescript', function(output, dest, options) {
12+
elixir.extend('typescript', function (output, dest, options) {
1413

1514
var pluginName = 'typescript';
1615
var search = '**/*.+(ts)';
16+
var assetPath = './' + elixir.config.assetsPath;
1717

1818
options = _.extend({
1919
sortOutput: true
2020
}, options);
2121

22-
new Task(pluginName, function(){
23-
var tsResult = gulp.src('./resources/assets/typescript/**/*.ts')
22+
new Task(pluginName, function () {
23+
var tsResult = gulp.src(assetPath + '/**/*.ts')
2424
.pipe(ts(options, undefined, _laravelReporter.ElixirMessage()));
2525
return tsResult
2626
.pipe(concat(output))
2727
.pipe(gulp.dest(dest || './public/js/app.js'));
2828
})
29-
.watch(
30-
pluginName,
31-
elixir.config.assetsDir + 'typescript' + '/' + search
32-
);
33-
//return elixir.config.queueTask(pluginName);
29+
.watch(assetPath + '/' + search);
3430
});

0 commit comments

Comments
 (0)