wip on using shared ui in android

This commit is contained in:
Danny Coates 2018-11-02 15:51:27 -07:00
parent 77a5a377e3
commit eb79ce1835
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
16 changed files with 105 additions and 181 deletions

View file

@ -1,21 +1,10 @@
const child_process = require('child_process');
const fs = require('fs');
const path = require('path');
child_process.execSync('npm run build');
const prefix = path.join('..', '..', 'dist');
const json_string = fs.readFileSync(path.join(prefix, 'manifest.json'));
const manifest = JSON.parse(json_string);
const android_filename = manifest['android.js'];
fs.writeFileSync(
'src/main/assets/android.js',
fs.readFileSync(`${prefix}${android_filename}`)
);
const vendor_filename = manifest['vendor.js'];
fs.writeFileSync(
'src/main/assets/vendor.js',
fs.readFileSync(`${prefix}${vendor_filename}`)
child_process.execSync(
`cp -R ${path.resolve(__dirname, '../dist')} ${path.resolve(
__dirname,
'app/src/main/assets'
)}`
);