Something went wrong. Try again.
Mirror — see github.com/blacksky-algorithms/blacksky.community
Something went wrong. Try again.
123456789101112131415161718192021222324252627const {withXcodeProject} = require('expo/config-plugins')const path = require('path')const fs = require('fs')
const withSounds = (config, {extensionName, soundFiles}) => { 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}