Bluesky app fork with some witchin' additions 馃挮
witchsky.app
bluesky
fork
client
1const {withXcodeProject} = require('expo/config-plugins')
2const path = require('path')
3const fs = require('fs')
4
5const withSounds = (config, {extensionName, soundFiles}) => {
6 return withXcodeProject(config, config => {
7 for (const file of soundFiles) {
8 const soundPath = path.join(config.modRequest.projectRoot, 'assets', file)
9
10 const targetPath = path.join(
11 config.modRequest.platformProjectRoot,
12 extensionName,
13 file,
14 )
15
16 if (!fs.existsSync(path.dirname(targetPath))) {
17 fs.mkdirSync(path.dirname(targetPath), {recursive: true})
18 }
19 fs.copyFileSync(soundPath, targetPath)
20 }
21
22 return config
23 })
24}
25
26module.exports = {withSounds}