0

I trying to write a task for Gulp for my "Task Runner Explore" in Visual Studio but get stacked. What I want is just to compile my .ts files, minify it and put inside "wwwroot/app" folder. I have this task:

var minify = require('gulp-minify');
var tsProject = ts.createProject('scripts/tsconfig.json');

gulp.task('ts', function (done) {

    var tsResult = gulp.src([
            "scripts/*.ts"
    ])
        .pipe(ts(tsProject), undefined, ts.reporter.fullReporter());

    return tsResult.js
        .pipe(minify())
        .pipe(gulp.dest('./wwwroot/app'));
});

but it show me errors:

at eval (eval at <anonymous> (C:\Users\Dantey\Documents\MY_project\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2907:23)

I also tried with uglify() but error is the same.

dantey89
  • 2,167
  • 24
  • 37
  • Also I wish to keep all files separately , not as one concatenated file – dantey89 Aug 18 '16 at 08:04
  • 2
    You have a misplaced `)`. The reporter needs to be the [third arg for `ts()`](https://github.com/ivogabe/gulp-typescript#reporters), not for `.pipe()`. – Sven Schoenung Aug 18 '16 at 08:22

0 Answers0