c3c891cea0
* enable predictive back gesture * upgrade to rn 85 * remove deprecated * added timeout to theme switch * fix plugin items hit registration * fix SearchbarV2 hit registration * fix loading spinner * migrated to expo * migrated to expo * Fix reader footer animation * working again * added icons back * added splashscreen * clean up * nitro epub * fix * remove .env.local from git tracking * fix rn background actions not working * moving custom permissions to app.json * more cleanup * fix epub import * remove unused deps * Further cleanup for gradle build types * Update build.yml * ignore android/ and ios/ as they are generated by CNG * fix lint * Delete ios directory * Delete android directory * fix lint * fix test mocks * update packages * update eslint * fix ThemeProvider placement * fix test and lint * Add BackgroundTask native module * Add NativeFile changes * first round of fixing compatibility issues * added types for native modules
32 lines
908 B
JavaScript
32 lines
908 B
JavaScript
const { withDangerousMod } = require('@expo/config-plugins');
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const withReaderAssets = (config) => {
|
|
config = withDangerousMod(config, [
|
|
'android',
|
|
(config) => {
|
|
const projectRoot = config.modRequest.projectRoot;
|
|
const platformRoot = config.modRequest.platformProjectRoot;
|
|
const assetsDir = path.join(platformRoot, 'app', 'src', 'main', 'assets');
|
|
const sourceRoot = path.join(projectRoot, 'assets', 'reader');
|
|
|
|
fs.mkdirSync(assetsDir, { recursive: true });
|
|
|
|
for (const subdir of ['css', 'js', 'fonts']) {
|
|
const src = path.join(sourceRoot, subdir);
|
|
const dest = path.join(assetsDir, subdir);
|
|
if (fs.existsSync(src)) {
|
|
fs.cpSync(src, dest, { recursive: true });
|
|
}
|
|
}
|
|
|
|
return config;
|
|
},
|
|
]);
|
|
|
|
return config;
|
|
};
|
|
|
|
module.exports = withReaderAssets;
|