forked from kkbhav/pouchdb-adapters-rn
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.js
23 lines (20 loc) · 873 Bytes
/
setup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var fs = require('fs')
var PATH = './node_modules/pouchdb-binary-utils/package.json'
var packageContent
try {
packageContent = JSON.parse(fs.readFileSync(PATH))
} catch (e) {
PATH = '../pouchdb-binary-utils/package.json'
packageContent = JSON.parse(fs.readFileSync(PATH))
}
packageContent['react-native'] = {
'./lib/index.js': './lib/index.js',
'./src/base64.js': './src/base64.js',
'./src/base64StringToBlobOrBuffer.js': './src/base64StringToBlobOrBuffer.js',
'./src/blob.js': './src/blob.js',
'./src/binaryStringToBlobOrBuffer.js': './src/binaryStringToBlobOrBuffer.js',
'./src/blobOrBufferToBase64.js': './src/blobOrBufferToBase64.js',
'./src/blobOrBufferToBinaryString.js': './src/blobOrBufferToBinaryString.js',
'./src/typedBuffer.js': './src/typedBuffer.js'
}
fs.writeFileSync(PATH, JSON.stringify(packageContent, null, ' ') + '\n', 'utf8')