1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00
joplin/packages/app-mobile/gulpfile.ts

55 lines
1.1 KiB
TypeScript
Raw Normal View History

2020-11-05 18:58:23 +02:00
const gulp = require('gulp');
const utils = require('@joplin/tools/gulp/utils');
const compilePackageInfo = require('@joplin/tools/compilePackageInfo');
import injectedJsGulpTasks from './tools/buildInjectedJs/gulpTasks';
2020-11-05 18:58:23 +02:00
const tasks = {
encodeAssets: {
fn: require('./tools/encodeAssets'),
},
copyWebAssets: {
fn: require('./tools/copyAssets').default,
},
compilePackageInfo: {
fn: async () => {
await compilePackageInfo(`${__dirname}/package.json`, `${__dirname}/packageInfo.js`);
},
},
...injectedJsGulpTasks,
2020-11-05 18:58:23 +02:00
podInstall: {
fn: require('./tools/podInstall'),
},
};
utils.registerGulpTasks(gulp, tasks);
gulp.task('buildInjectedJs', gulp.series(
'beforeBundle',
'buildCodeMirrorEditor',
'buildJsDrawEditor',
'buildPluginBackgroundScript',
'buildNoteViewerBundle',
'copyWebviewLib',
));
gulp.task('watchInjectedJs', gulp.series(
'beforeBundle',
'copyWebviewLib',
gulp.parallel(
'watchCodeMirrorEditor',
'watchJsDrawEditor',
'watchPluginBackgroundScript',
'watchNoteViewerBundle',
),
));
2020-11-05 18:58:23 +02:00
gulp.task('build', gulp.series(
'compilePackageInfo',
'buildInjectedJs',
'copyWebAssets',
2020-11-05 18:58:23 +02:00
'encodeAssets',
'podInstall',
2020-11-05 18:58:23 +02:00
));