This extension allows you to add a variable to env file and sample-env file automatically by right clicking on the line and click on Add Line to env.
Note: If only works for Javascript file at the moment.
This extension save you the stress of creating .env file and sample-env file. To add this line to env file automatically;
const KEY = "MysecretKey"; - Right click on the line
- Click on
Add Line to env
The line will change to:
const KEY = process.env.KEYThe env and sample-env file will also be populated
This extension requires that autoenv.filename key be added to your VSCODE settings.json file and value should be the sample-env filename, if not privided it will default to sample-env. See example below
"autoenv-filename": "sample-env"- None
- No issues
Initial release of autoenv
- Add a new Gif
- ALlow extension be compatible with previous versions of vscode
- Fix env appending to existing env
- Choose sample-env filename from vscode settings
Enjoy! https://marketplace.visualstudio.com/items?itemName=danielshow.autoenv&ssr=false
