{"id":26233780,"url":"https://github.com/garyb432/venv","last_synced_at":"2025-04-22T12:11:25.351Z","repository":{"id":57391554,"uuid":"100145044","full_name":"GaryB432/venv","owner":"GaryB432","description":"Use build- or release-time environment variables in your javascript project","archived":false,"fork":false,"pushed_at":"2017-10-25T18:11:21.000Z","size":45,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T15:01:44.580Z","etag":null,"topics":["environment-variables","javasscript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GaryB432.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-13T00:43:47.000Z","updated_at":"2020-04-28T12:51:20.000Z","dependencies_parsed_at":"2022-09-19T05:01:26.437Z","dependency_job_id":null,"html_url":"https://github.com/GaryB432/venv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GaryB432%2Fvenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GaryB432%2Fvenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GaryB432%2Fvenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GaryB432%2Fvenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GaryB432","download_url":"https://codeload.github.com/GaryB432/venv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250237834,"owners_count":21397401,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["environment-variables","javasscript"],"created_at":"2025-03-13T01:17:41.328Z","updated_at":"2025-04-22T12:11:25.309Z","avatar_url":"https://github.com/GaryB432.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# venv\n\n[![VSTS Extension](https://vsmarketplacebadge.apphb.com/version/garybortosky.venvextension.svg)](https://marketplace.visualstudio.com/items?itemName=garybortosky.venvextension)\n[![Build Status](https://travis-ci.org/GaryB432/venv.svg?branch=master)](https://travis-ci.org/GaryB432/venv)\n[![npm version](https://badge.fury.io/js/venv.svg)](https://badge.fury.io/js/venv)\n\nMake build-time environment variables available to your application.\n\nVenv uses [EJS](https://ejs.co) to transform a template file using Node's `process.env` map.\n\n## CLI Usage\n\nUsage: `venv \u003ccmd\u003e [options]`\n\nYour build or deploy pipeline could include\n\n```\nnpm install venv -g\nvenv process -t src\\environments\\environment.prod.ts\n```\n\n### Commands:\n\n### process\n\n - appends `.template` to the filename passed as argument `t`\n - transforms that file using `process.env` as the context\n - saves the result to the original name supplied on the command line\n\n### Options:\n\n```\n-t, --templatePath    the path to the template file\n-h, --help            show help\n-v, --version         current version\n```\n\n#### Example\n\n\u003e venv process --templatePath assets\\env.js\n\n__assets\\env.js.template__:\n```javascript\n(function (window) {\n  window.__env = window.__env || {};\n  window.__env.BUILD_BUILDNUMBER = '\u003c%= env.BUILD_BUILDNUMBER %\u003e';\n}(this));\n```\n\n```html\n\u003chtml\u003e\n\n\u003chead\u003e\n  \u003cmeta charset=\"utf-8\"\u003e\n  \u003cscript src=\"assets/env.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\n\u003cbody\u003e\n  \u003cscript\u003e\n    console.log(__env.BUILD_BUILDNUMBER);\n  \u003c/script\u003e\n\u003c/body\u003e\n\n\u003c/html\u003e\n```\n\n## Exit Codes\n\nThe CLI process may exit with the following codes:\n\n- `0`: Transform succeeded without errors\n- `1`: An invalid command line argument or combination thereof was used\n- `2`: Transform failed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaryb432%2Fvenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaryb432%2Fvenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaryb432%2Fvenv/lists"}