Files
react-native-mapbox-gl/example/scripts/set_access_token.js
T

12 lines
309 B
JavaScript
Raw Normal View History

2017-09-01 13:30:53 -07:00
const fs = require('fs');
const path = require('path');
const accessToken = fs.readFileSync(path.join('./', 'accesstoken'));
if (!accessToken) {
process.exit(1);
}
const fileContents = `{ "accessToken": "${new String(accessToken).trim()}" }`;
fs.writeFileSync(path.join('./', 'env.json'), fileContents);