2.0.1 • Published 5 years ago

node-parameter-handler v2.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

node.js parameter handler

can be used as config builder, inspired by @Incenteev/ParameterHandler useful for 'legacy' applications, if you're using react-scripts@3, consider use .env file instead, as in this example repository

build coverage coverage

how to install

$ npm i node-parameter-handler or $ yarn add node-parameter-handler

software requirements

used technologies

  • jest - only for tests

used services

how to execute

  • $ node_modules/.bin/node-parameter-handler

how to execute tests

  • $ npm test
  • to execute tests with coverage npm test -- --coverage

how to use

include configs into root package.json into 'extra' node

observe an example of package.json

{
    ...
    "extra": {
        "node_parameter_handler": [
            {
                "source": "tests/fixtures/settings.json.dist", # source
                "output": "var/settings1.json",                # output
                "envMap": {
                    "touched": "BASE_URL", # json path to ENV VARIABLE
                    "test.touched": "PWD",
                    "test.test.touched": "HOME"
                }
            },
            {
                "source": "tests/fixtures/settings.json.dist", # source
                "output": "var/settings2.json",                # output
                "skipUndefined": true,                         # if variable is not defined do not change
                "envMap": {
                    "touched": "BASE_URL", # json path to ENV VARIABLE
                    "test.touched": "PWD",
                    "test.test.touched": "HOME"
                }
            }
        ]
    }
}
2.0.1

5 years ago

2.0.0

5 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago