mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 15:25:54 -06:00
19 lines
631 B
TypeScript
19 lines
631 B
TypeScript
const gulp = require("gulp");
|
|
const gutil = require("gulp-util");
|
|
const sourcemaps = require("gulp-sourcemaps");
|
|
const tsb = require("gulp-tsb");
|
|
const del = require("del");
|
|
|
|
const project = tsb.create("tsconfig.json")
|
|
|
|
gulp.task("clean", () => del(["dist/**/*"]));
|
|
|
|
gulp.task("build", () => gulp.src(["src/**/*.ts"])
|
|
.pipe(sourcemaps.init())
|
|
.pipe(project())
|
|
.pipe(sourcemaps.write(".", { sourceRoot: "../src", includeContent: false, destPath: "dist" }))
|
|
.pipe(gulp.dest("dist")));
|
|
|
|
gulp.task("watch", () => gulp.watch(["src/**/*", "tsconfig.json"], ["build"]));
|
|
|
|
gulp.task("default", ["build"]); |