2020-11-05 18:58:23 +02:00
|
|
|
const gulp = require('gulp');
|
2020-11-07 17:59:37 +02:00
|
|
|
const utils = require('@joplin/tools/gulp/utils');
|
2023-11-12 17:07:30 +02:00
|
|
|
|
2024-03-11 17:02:15 +02:00
|
|
|
import injectedJsGulpTasks from './tools/buildInjectedJs/gulpTasks';
|
2020-11-05 18:58:23 +02:00
|
|
|
|
|
|
|
const tasks = {
|
|
|
|
encodeAssets: {
|
|
|
|
fn: require('./tools/encodeAssets'),
|
|
|
|
},
|
2024-03-11 17:02:15 +02:00
|
|
|
...injectedJsGulpTasks,
|
2020-11-05 18:58:23 +02:00
|
|
|
podInstall: {
|
|
|
|
fn: require('./tools/podInstall'),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
utils.registerGulpTasks(gulp, tasks);
|
|
|
|
|
2023-11-12 17:07:30 +02:00
|
|
|
gulp.task('buildInjectedJs', gulp.series(
|
|
|
|
'beforeBundle',
|
|
|
|
'buildCodeMirrorEditor',
|
|
|
|
'buildJsDrawEditor',
|
2024-03-11 17:02:15 +02:00
|
|
|
'buildPluginBackgroundScript',
|
2023-11-12 17:07:30 +02:00
|
|
|
'copyWebviewLib',
|
|
|
|
));
|
|
|
|
|
|
|
|
gulp.task('watchInjectedJs', gulp.series(
|
|
|
|
'beforeBundle',
|
|
|
|
'copyWebviewLib',
|
|
|
|
gulp.parallel(
|
|
|
|
'watchCodeMirrorEditor',
|
|
|
|
'watchJsDrawEditor',
|
2024-03-11 17:02:15 +02:00
|
|
|
'watchPluginBackgroundScript',
|
2023-11-12 17:07:30 +02:00
|
|
|
),
|
|
|
|
));
|
|
|
|
|
2020-11-05 18:58:23 +02:00
|
|
|
gulp.task('build', gulp.series(
|
2021-07-13 20:13:13 +02:00
|
|
|
'buildInjectedJs',
|
2020-11-05 18:58:23 +02:00
|
|
|
'encodeAssets',
|
2023-08-22 12:58:53 +02:00
|
|
|
'podInstall',
|
2020-11-05 18:58:23 +02:00
|
|
|
));
|