{"id":15062140,"url":"https://github.com/wiredviews/angular-version-builder","last_synced_at":"2025-07-27T09:13:07.279Z","repository":{"id":34731631,"uuid":"155622735","full_name":"wiredviews/angular-version-builder","owner":"wiredviews","description":"Version Files builder for Angular build facade","archived":false,"fork":false,"pushed_at":"2023-01-07T06:22:04.000Z","size":1039,"stargazers_count":1,"open_issues_count":23,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T10:09:49.096Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wiredviews.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-31T21:00:23.000Z","updated_at":"2024-06-28T14:21:11.000Z","dependencies_parsed_at":"2023-01-15T08:49:11.965Z","dependency_job_id":null,"html_url":"https://github.com/wiredviews/angular-version-builder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wiredviews/angular-version-builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiredviews%2Fangular-version-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiredviews%2Fangular-version-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiredviews%2Fangular-version-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiredviews%2Fangular-version-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wiredviews","download_url":"https://codeload.github.com/wiredviews/angular-version-builder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiredviews%2Fangular-version-builder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267335540,"owners_count":24070778,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-09-24T23:31:00.568Z","updated_at":"2025-07-27T09:13:07.236Z","avatar_url":"https://github.com/wiredviews.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Version Files\n\nVersion Files builder for Angular build facade.\n\n## Description\n\nKeeping user-agent clients up to date with the latest Angular application code can be difficult due to caching and the nature of single-page apps.\n\nThe most common approach is polling on the client side to determine if there are any updates available.\n\nThis package generates a `version.ts` file and a `version.json` file source from the version in your `package.json`.\n\nThe `version.ts` file is an ES Module and should be imported into your code base. This way the application knows its current version.\n\nThe `version.json` file should be deployed with the application assets to the server to indicate which version of the application is currently deployed.\n\nThe developer can then poll against the `version.json` file on the server and compare its version to the version exposed by the `version.ts` in the application. If they differ then the application knows an update is available and can prompt the user or reload the app.\n\n## Requirements\n\nv0.1.x works with Angular CLI \u003c 8.0.0\nv0.2.x works with Angular CLI \u003e= 8.0.0\n\n## Usage\n\n1. In the root of your Angular application:\n\n   ```bash\n   npm i -D @wiredviews/angular-version-builder\n   ```\n\n2. In your _angular.json_ add the following to _architect_ section of the relevant project:\n\n   ```bash\n   \"version-files\": {\n     \"builder\": \"@wiredviews/angular-version-builder:files\",\n     \"options\": {\n        \"tsOutputPath\": \"src/environments/version.ts\",\n        \"jsonOutputPath\": \"src/version.json\"\n     }\n   },\n   ```\n\n3. Run: `ng run [relevant-project]:version-files`\n   Where _[relevant-project]_ is the project to which you've added the target\n\n## Options\n\nBoth of these values are relative to the workspace root\n\n- `tsOutputPath` - path to the typescript module containing your application version which you can import into your application to be deployed with it\n- `jsonOutputPath` - path to the json file that contains the your application version that is deployed on the server\n\n## Credits\n\nInspiration from [https://medium.com/dailyjs/angular-cli-6-under-the-hood-builders-demystified-f0690ebcf01](https://medium.com/dailyjs/angular-cli-6-under-the-hood-builders-demystified-f0690ebcf01)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiredviews%2Fangular-version-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiredviews%2Fangular-version-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiredviews%2Fangular-version-builder/lists"}