gettoml
v1.0.3
Published
this project serve to read toml files efficiently and use the result directly into a terminal.
Downloads
181
Maintainers
Readme
toml-reader
this project serve to read toml files efficiently and use the result directly into a terminal.
Overview
Run it
By installing it
for installation : npm install -g gettoml or yarn global add gettoml
run gettoml --tomlPath path_to_toml.toml --valuePath path_to_value_in_toml
if in your shell scripts you need default values if no values were found in the toml file you can
add --defaultValue defaultValue
Using npx
skip the installation part, and add npx before gettoml as follows: npx gettoml ...
Examples
if you have a toml file named example.toml as below:
lang = "typescript"
[build]
command = "yarn build"you can find :
- the
langusing the commandnpx gettoml --tomlPath example.toml --valuePath lang - the
build commandusing the commandnpx gettoml --tomlPath example.toml --valuePath build.command - a hypothetical value named
pushusing the commandnpx gettoml --tomlPath example.toml --valuePath push --defaultValue "yarn deploy"
