@expo/template-file
TypeScript icon, indicating that this package has built-in type declarations

1.0.117 • Public • Published

@expo/template-file

@expo/template-file provides file-level variable substitution (Mustache template style).

API

templateFile(templateFilePath: string, outputFilePath: string, envs: Record<string, string | number>): Promise<void>

Usage example

import templateFile from '@expo/template-file';

await templateFile('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:

{
  "someKey": 123,
  "anotherKey": 789
}

Repository

https://github.com/expo/eas-build/tree/main/packages/template-file

Readme

Keywords

none

Package Sidebar

Install

npm i @expo/template-file

Weekly Downloads

9,090

Version

1.0.117

License

BUSL-1.1

Unpacked Size

9.56 kB

Total Files

9

Last publish

Collaborators

  • radoslawkrzemien
  • pkham
  • szdziedzic
  • tsapeta
  • ide
  • lukmccall
  • douglowder
  • betoatexpo
  • philpl
  • expo-bot
  • alanhughes
  • kadikraman
  • aleqsio
  • marklawlor
  • gabrieldonadel
  • simek
  • keith-kurak
  • fiber-god
  • brentvatne
  • evanbacon
  • quinlanj
  • expoadmin
  • exponent
  • wschurman
  • bycedric
  • jonsamp
  • princefleaswallow
  • kudochien