@expo/template-file
`@expo/template-file` provides file-level variable substitution (Mustache template style).
Last updated a month ago by wkozyra .
ISC · Original npm · Tarball · package.json
$ cnpm install @expo/template-file 
SYNC missed versions from official npm registry.

@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/turtle-v2/tree/master/src/libs/template-file

Current Tags

  • 0.1.6                                ...           latest (a month ago)

7 Versions

  • 0.1.6                                ...           a month ago
  • 0.1.5                                ...           2 months ago
  • 0.1.4                                ...           3 months ago
  • 0.1.3                                ...           3 months ago
  • 0.1.2                                ...           3 months ago
  • 0.1.1                                ...           5 months ago
  • 0.1.0                                ...           7 months ago

Copyright 2014 - 2016 © taobao.org |