Bluesky app fork with some witchin' additions 💫 forked from jollywhoppers.com/witchsky.app
Something went wrong. Try again.
746 B · 27 lines
JavaScript
at commit 5efae600
12345678910111213141516171819202122232425262728const {withXcodeProject} = require('@expo/config-plugins')const path = require('path')const fs = require('fs')
const withSounds = (config, {extensionName, soundFiles}) => { // eslint-disable-next-line no-shadow return withXcodeProject(config, config => { for (const file of soundFiles) { const soundPath = path.join(config.modRequest.projectRoot, 'assets', file)
const targetPath = path.join( config.modRequest.platformProjectRoot, extensionName, file, )
if (!fs.existsSync(path.dirname(targetPath))) { fs.mkdirSync(path.dirname(targetPath), {recursive: true}) } fs.copyFileSync(soundPath, targetPath) }
return config })}
module.exports = {withSounds}