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

@expo/envsub

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

API

envsub(templateFile: string, outputFile: string, envs: Record<string, string | number>): Promise<void>

Usage example

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:

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

Repository

https://github.com/expo/turtle-v2/tree/master/src/envsub

Current Tags

  • 0.1.3                                ...           latest (6 months ago)

4 Versions

  • 0.1.1                                ...           6 months ago
  • 0.1.3                                ...           6 months ago
  • 0.1.2                                ...           6 months ago
  • 0.1.0                                ...           6 months ago

Copyright 2014 - 2016 © taobao.org |