.env file
If you change your launch.json
settings regularly, or don't want to check certain values into version control, then another option is to store those values in a .env
file. Then, reference it in your launch.json
and use ${env:YOUR_VAR_NAME}
in launch.json
settings. Here's an example.
//launch.json
{
"version": "0.2.0",
"configurations": [
{
...
"envFile": "${workspaceFolder}/.env",
"username": "${env:ROKU_USERNAME}",
"password": "${env:ROKU_PASSWORD}"
...
}
]
}
# .env
#the username for the roku
ROKU_USERNAME=rokudev
#the password for the roku
ROKU_PASSWORD=password123
This extension uses the dotenv npm module for parsing the .env
files, so see this link for syntax information.