Basic setup of screens. No connection with backend
This commit is contained in:
parent
8e0a267423
commit
e49de778c3
17 changed files with 9977 additions and 237 deletions
22
postinstall.js
Normal file
22
postinstall.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
const chalk = require('chalk')
|
||||
const { readFile, writeFile, copyFile } = require('fs').promises
|
||||
|
||||
console.log(chalk.green('here'))
|
||||
|
||||
function log(...args) {
|
||||
console.log(chalk.yellow('[react-native-maps]'), ...args)
|
||||
}
|
||||
|
||||
reactNativeMaps = async function() {
|
||||
log('📦 Creating web compatibility of react-native-maps using an empty module loaded on web builds')
|
||||
const modulePath = 'node_modules/react-native-maps'
|
||||
await writeFile(`${modulePath}/lib/index.web.js`, 'module.exports = {}', 'utf-8')
|
||||
await copyFile(`${modulePath}/lib/index.d.ts`, `${modulePath}/lib/index.web.d.ts`)
|
||||
const pkg = JSON.parse(await readFile(`${modulePath}/package.json`))
|
||||
pkg['react-native'] = 'lib/index.js'
|
||||
pkg['main'] = 'lib/index.web.js'
|
||||
await writeFile(`${modulePath}/package.json`, JSON.stringify(pkg, null, 2), 'utf-8')
|
||||
log('✅ script ran successfully')
|
||||
}
|
||||
|
||||
reactNativeMaps()
|
Loading…
Add table
Add a link
Reference in a new issue