Struggling to make gulp.dest
output correctly. I'm aiming to output to the root of an ASP.NET Core project that I'm repurposing for TypeScript development. Any guidance on how to achieve this would be greatly appreciated. Below is the current content of my gulpfile.js:
/// <binding AfterBuild="build" Clean="clean" ProjectOpened="watch" />
"use strict";
const del = require("del"),
gulp = require("gulp"),
gulpConcat = require("gulp-concat"),
gulpRename = require("gulp-rename"),
gulpTerser = require("gulp-terser");
gulp.task("concatenate", () => {
return gulp.src([
"*.js",
"!gulpfile.js"
])
.pipe(gulpConcat("concatenated.js"))
.pipe(gulp.dest("/"));
});
gulp.task("minify", () => {
return gulp.src("concatenated.js")
.pipe(gulpTerser())
.pipe(gulpRename("min.js"))
.pipe(gulp.dest("/"));
});
gulp.task("clean", () => del([
"*.js",
"!gulpfile.js"
]));
gulp.task("build", gulp.series(
"concatenate",
"minify"
));
gulp.task("watch", () => {
gulp.watch([
"*.ts"
], gulp.series(
"build"
));
});