@expo/template-file
`@expo/template-file` provides file-level variable substitution (Mustache template style).
Last updated 5 days 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.11                                ...           latest (5 days ago)

12 Versions

  • 0.1.11                                ...           5 days ago
  • 0.1.10                                ...           7 days ago
  • 0.1.9                                ...           11 days ago
  • 0.1.8                                ...           a month ago
  • 0.1.7                                ...           6 months ago
  • 0.1.6                                ...           8 months ago
  • 0.1.5                                ...           8 months ago
  • 0.1.4                                ...           10 months ago
  • 0.1.3                                ...           10 months ago
  • 0.1.2                                ...           10 months ago
  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago

Copyright 2014 - 2016 © taobao.org |