2020-02-21 00:59:18 +02:00
|
|
|
const gulp = require('gulp');
|
|
|
|
const utils = require('../Tools/gulp/utils');
|
|
|
|
|
|
|
|
const tasks = {
|
|
|
|
compileScripts: {
|
|
|
|
fn: require('./tools/compileScripts'),
|
|
|
|
},
|
|
|
|
compilePackageInfo: {
|
|
|
|
fn: require('./tools/compile-package-info.js'),
|
|
|
|
},
|
|
|
|
copyPluginAssets: {
|
|
|
|
fn: require('./tools/copyPluginAssets.js'),
|
|
|
|
},
|
2020-05-04 01:55:41 +02:00
|
|
|
copyTinyMceLangs: {
|
|
|
|
fn: require('./tools/copyTinyMceLangs.js'),
|
|
|
|
},
|
2020-02-21 00:59:18 +02:00
|
|
|
electronRebuild: {
|
|
|
|
fn: require('./tools/electronRebuild.js'),
|
|
|
|
},
|
2020-09-06 14:07:00 +02:00
|
|
|
compileExtensions: {
|
|
|
|
fn: require('../Tools/gulp/tasks/compileExtensions.js'),
|
|
|
|
},
|
2020-02-21 00:59:18 +02:00
|
|
|
copyLib: require('../Tools/gulp/tasks/copyLib'),
|
2020-03-23 02:47:25 +02:00
|
|
|
tsc: require('../Tools/gulp/tasks/tsc'),
|
2020-08-01 15:48:56 +02:00
|
|
|
updateIgnoredTypeScriptBuild: require('../Tools/gulp/tasks/updateIgnoredTypeScriptBuild'),
|
2020-02-21 00:59:18 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
utils.registerGulpTasks(gulp, tasks);
|
|
|
|
|
2020-03-23 02:47:25 +02:00
|
|
|
const buildSeries = [
|
2020-09-06 14:07:00 +02:00
|
|
|
'compileExtensions',
|
2020-02-21 00:59:18 +02:00
|
|
|
'copyLib',
|
2020-03-23 02:47:25 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
// On Windows also run tsc because `npm run watch` locks some folders
|
|
|
|
// which makes the copyPluginAssets command fail. For that reason,
|
|
|
|
// it's not possible to run watch on Windows while testing the desktop app.
|
|
|
|
if (require('os').platform() === 'win32') {
|
2020-06-23 00:06:47 +02:00
|
|
|
// buildSeries.push('tsc');
|
2020-03-23 02:47:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
const buildParallel = [
|
|
|
|
gulp.series(...buildSeries),
|
2020-02-21 00:59:18 +02:00
|
|
|
'compileScripts',
|
|
|
|
'compilePackageInfo',
|
|
|
|
'copyPluginAssets',
|
2020-05-04 01:55:41 +02:00
|
|
|
'copyTinyMceLangs',
|
2020-08-01 15:48:56 +02:00
|
|
|
'updateIgnoredTypeScriptBuild',
|
2020-03-23 02:47:25 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
gulp.task('build', gulp.parallel(...buildParallel));
|