1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-30 08:26:59 +02:00
joplin/packages/app-mobile/gulpfile.js

42 lines
1.0 KiB
JavaScript
Raw Normal View History

2020-11-05 18:58:23 +02:00
const gulp = require('gulp');
const fs = require('fs-extra');
const utils = require('@joplinapp/tools/gulp/utils');
const tasks = {
encodeAssets: {
fn: require('./tools/encodeAssets'),
},
buildReactNativeInjectedJs: {
fn: require('./tools/buildReactNativeInjectedJs'),
},
podInstall: {
fn: require('./tools/podInstall'),
},
2020-11-06 20:45:45 +02:00
prepareRelease: {
fn: require('./tools/prepareRelease'),
},
2020-11-05 18:58:23 +02:00
// clean: {
// fn: require('./tools/clean'),
// },
linkReact: {
fn: async () => {
// React is a dependency of both the lib and app-desktop
// packages, which cause a duplicate React issue. To go around
// this, one way is to manually link the package.
// https://reactjs.org/warnings/invalid-hook-call-warning.html#duplicate-react
process.chdir(__dirname);
await fs.remove('./node_modules/react');
await utils.execCommand('npm link ../lib/node_modules/react');
},
},
};
utils.registerGulpTasks(gulp, tasks);
gulp.task('build', gulp.series(
'buildReactNativeInjectedJs',
'encodeAssets',
// 'linkReact',
'podInstall'
));