You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-26 22:41:17 +02:00
Desktop: Added support for checkboxes and fixed various issues with WYSIWYG editor
This commit is contained in:
26
gulpfile.js
26
gulpfile.js
@@ -1,28 +1,11 @@
|
||||
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 = {
|
||||
copyLib: require('./Tools/gulp/tasks/copyLib'),
|
||||
};
|
||||
|
||||
const tsProject = ts.createProject('tsconfig.json');
|
||||
|
||||
const tscTaskSrc = [
|
||||
'ReactNativeClient/**/*.tsx',
|
||||
'ReactNativeClient/**/*.ts',
|
||||
'ElectronClient/**/*.tsx',
|
||||
'ElectronClient/**/*.ts',
|
||||
'CliClient/**/*.tsx',
|
||||
'CliClient/**/*.ts',
|
||||
];
|
||||
|
||||
const tscTask = function() {
|
||||
return tsProject.src()
|
||||
.pipe(tsProject())
|
||||
.js.pipe(gulp.dest('./'));
|
||||
tsc: require('./Tools/gulp/tasks/tsc'),
|
||||
};
|
||||
|
||||
const updateIgnoredTypeScriptBuildTask = async function() {
|
||||
@@ -34,6 +17,7 @@ const updateIgnoredTypeScriptBuildTask = async function() {
|
||||
'**/CliClient/build/lib/**',
|
||||
'**/CliClient/tests-build/lib/**',
|
||||
'**/ElectronClient/dist/**',
|
||||
'**/Modules/TinyMCE/JoplinLists/**',
|
||||
],
|
||||
}).map(f => f.substr(__dirname.length + 1));
|
||||
|
||||
@@ -50,17 +34,17 @@ const updateIgnoredTypeScriptBuildTask = async function() {
|
||||
await utils.replaceFileText(`${__dirname}/.eslintignore`, regex, replacement);
|
||||
};
|
||||
|
||||
gulp.task('tsc', tscTask);
|
||||
gulp.task('tsc', tasks.tsc.fn);
|
||||
gulp.task('copyLib', tasks.copyLib.fn);
|
||||
gulp.task('updateIgnoredTypeScriptBuild', updateIgnoredTypeScriptBuildTask);
|
||||
|
||||
gulp.task('watch', function() {
|
||||
gulp.watch(tasks.copyLib.src, tasks.copyLib.fn);
|
||||
gulp.watch(tscTaskSrc, updateIgnoredTypeScriptBuildTask);
|
||||
gulp.watch(tasks.tsc.src, 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}` });
|
||||
const promise = execa('node', ['node_modules/typescript/bin/tsc', '--project', 'tsconfig.json'], { cwd: `${__dirname}` });
|
||||
promise.stdout.pipe(process.stdout);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user