Skip to content

Instantly share code, notes, and snippets.

@gladius882
Created February 1, 2022 18:38
Show Gist options
  • Save gladius882/b6198c1da54e65610d3c71495cf0bc9b to your computer and use it in GitHub Desktop.
Save gladius882/b6198c1da54e65610d3c71495cf0bc9b to your computer and use it in GitHub Desktop.
Basic gulpfile for ts and less
let gulp = require('gulp');
let ts = require('gulp-typescript');
let less = require('gulp-less');
let path = require('path');
let watch = require('gulp-watch');
gulp.task('ts', function() {
return gulp.src('src/**/*.ts')
.pipe(ts({
noImplicitAny: true
}))
.pipe(gulp.dest('dist'));
});
gulp.task('less', function() {
return gulp.src('src/**/*.less')
.pipe(less())
.pipe(gulp.dest('dist'));
});
gulp.task('watch', function() {
watch('src/**/*', function() {
gulp.series('ts', 'less').call();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment