mirror of
https://github.com/fergalmoran/onearmy-community-platform.git
synced 2025-12-24 02:30:50 +00:00
27 lines
875 B
TypeScript
27 lines
875 B
TypeScript
import { writeFileSync } from 'fs'
|
|
import { resolve } from 'path'
|
|
import type { configVars } from '../src/config/config'
|
|
|
|
process.env.FUNCTIONS_EMULATOR = 'true'
|
|
process.env.FIREBASE_AUTH_EMULATOR_HOST = 'localhost:4005'
|
|
process.env.FIREBASE_DATABASE_EMULATOR_HOST = 'localhost:4006'
|
|
process.env.FIRESTORE_EMULATOR_HOST = 'localhost:4003'
|
|
|
|
/** Variables populates in the same way firebase functions:config:set does */
|
|
const runtimeConfig: configVars = {
|
|
analytics: {
|
|
tracking_code: 'fake_tracking_code',
|
|
view_id: 'fake_view_id',
|
|
},
|
|
integrations: {
|
|
discord_webhook: 'fake_discord_webhook',
|
|
slack_webhook: 'fake_slack_webhook',
|
|
},
|
|
service: null as any,
|
|
deployment: {
|
|
site_url: 'https://functions.test',
|
|
},
|
|
}
|
|
const runtimeConfigPath = resolve(__dirname, '../.runtimeconfig.json')
|
|
writeFileSync(runtimeConfigPath, JSON.stringify(runtimeConfig))
|