mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-21 09:38:01 +02:00
Tools: Improve tsc watch
This commit is contained in:
parent
0f28060795
commit
d228ff9fbd
@ -1,6 +1,7 @@
|
||||
const gulp = require('gulp');
|
||||
const glob = require('glob');
|
||||
const ts = require('gulp-typescript');
|
||||
const execa = require('execa');
|
||||
const utils = require('./Tools/gulp/utils');
|
||||
|
||||
const tasks = {
|
||||
@ -54,7 +55,12 @@ gulp.task('updateIgnoredTypeScriptBuild', updateIgnoredTypeScriptBuildTask);
|
||||
|
||||
gulp.task('watch', function() {
|
||||
gulp.watch(tasks.copyLib.src, tasks.copyLib.fn);
|
||||
gulp.watch(tscTaskSrc, gulp.series('tsc', 'updateIgnoredTypeScriptBuild'));
|
||||
gulp.watch(tscTaskSrc, updateIgnoredTypeScriptBuildTask);
|
||||
|
||||
// For watching, we use the actual tsc tool because it's more robust and
|
||||
// doesn't crash when there's an error
|
||||
const promise = execa('npx', ['tsc', '--watch', '--project', 'tsconfig.json'], { cwd: `${__dirname}` });
|
||||
promise.stdout.pipe(process.stdout);
|
||||
});
|
||||
|
||||
gulp.task('build', gulp.series('copyLib', 'tsc', 'updateIgnoredTypeScriptBuild'));
|
||||
|
Loading…
Reference in New Issue
Block a user