`@expo/envsub` provides file-level variable substitution (Mustache template style).
npm install @expo/envsub@expo/envsub provides file-level variable substitution (Mustache template style).
``ts`
envsub(templateFile: string, outputFile: string, envs: Record
`ts
import envsub from '@expo/envsub';
await envsub('abc.json.template', 'abc.json', { ABC: 123, XYZ: 789 });
`
abc.json.template file contents:``
{
"someKey": {{ ABC }},
"anotherKey": {{ XYZ }}
}
abc.json file should be created with the following contents:`json``
{
"someKey": 123,
"anotherKey": 789
}
https://github.com/expo/turtle-v2/tree/master/src/envsub