{"id":8605315,"url":"https://github.com/chrisguttandin/angular-prerender","last_synced_at":"2026-04-02T15:48:19.997Z","repository":{"id":46929851,"uuid":"142886533","full_name":"chrisguttandin/angular-prerender","owner":"chrisguttandin","description":"A command line tool to prerender Angular Apps.","archived":false,"fork":false,"pushed_at":"2026-03-27T22:46:21.000Z","size":9509,"stargazers_count":127,"open_issues_count":5,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-03-28T05:10:34.426Z","etag":null,"topics":["angular","cli","command-line","ngx","server-side-rendering","static-site-generator"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/chrisguttandin.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-07-30T14:25:24.000Z","updated_at":"2026-03-27T22:46:26.000Z","dependencies_parsed_at":"2023-09-25T02:36:10.102Z","dependency_job_id":"31fc2365-b788-4198-a97d-eac0085c714d","html_url":"https://github.com/chrisguttandin/angular-prerender","commit_stats":{"total_commits":2909,"total_committers":4,"mean_commits":727.25,"dds":"0.0013750429700928324","last_synced_commit":"f4d53c2d70acd5aa0471e90c467340917ced467f"},"previous_names":[],"tags_count":383,"template":false,"template_full_name":null,"purl":"pkg:github/chrisguttandin/angular-prerender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisguttandin%2Fangular-prerender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisguttandin%2Fangular-prerender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisguttandin%2Fangular-prerender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisguttandin%2Fangular-prerender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisguttandin","download_url":"https://codeload.github.com/chrisguttandin/angular-prerender/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisguttandin%2Fangular-prerender/sbom","scorecard":{"id":279940,"data":{"date":"2025-08-11","repo":{"name":"github.com/chrisguttandin/angular-prerender","commit":"b8e121eae4d4e827aae27dcb32534078b897547f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":10,"reason":"12 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/chrisguttandin/angular-prerender/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/chrisguttandin/angular-prerender/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/chrisguttandin/angular-prerender/test.yml/master?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T15:29:44.773Z","repository_id":46929851,"created_at":"2025-08-17T15:29:44.773Z","updated_at":"2025-08-17T15:29:44.773Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31309335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["angular","cli","command-line","ngx","server-side-rendering","static-site-generator"],"created_at":"2024-04-26T12:25:27.485Z","updated_at":"2026-04-02T15:48:19.955Z","avatar_url":"https://github.com/chrisguttandin.png","language":"JavaScript","readme":"![logo](https://repository-images.githubusercontent.com/142886533/bd323700-e8ff-11e9-9645-75bc009ee359)\n\n# angular-prerender\n\n**A command line tool to prerender Angular Apps.**\n\n[![version](https://img.shields.io/npm/v/angular-prerender.svg?style=flat-square)](https://www.npmjs.com/package/angular-prerender)\n\nThis command line tool is meant to simplify the build process of static [Angular](https://angular.io/) apps. It works by analyzing the config file created by the [Angular CLI](https://cli.angular.io/). It looks for a client and server app target defined in the angular.json file. It does then render each route and merges the output with the static build for the client.\n\n## Usage\n\nangular-prerender is available on [npm](https://www.npmjs.com/package/angular-prerender). It will most likely be a dev dependency of your project. The command to install it will then look like this:\n\n```shell\nnpm install angular-prerender --save-dev\n```\n\nIn case you used all the default settings of the CLI angular-prerender will be able to pick up all the necessary information on its own. You can run it on the command line by only specifying the browser target.\n\n```shell\nnpx angular-prerender --target universe:build\n```\n\nIt is also possible to skip the explicit installation of angular-prerender.\n\nThe following is a complete example which will generate a very basic static Angular app called \"universe\".\n\n```shell\nnpx @angular/cli new universe --routing\ncd universe\nng add @angular/ssr\nng config projects.universe.architect.build.options.prerender false\nnpm install angular-prerender --save-dev\nng build\nnpx angular-prerender --target universe:build\n```\n\n## Arguments\n\nIn some scenarios angular-prerender will not be able to grab all the information by analyzing the angular.json file alone. In that case you can help it by specifying some command line arguments.\n\n### --config\n\nThe config option expects a path (including the filename) to the angular.json file of your project. By default it will look for it in the current working directory.\n\n### --exclude-routes\n\nThis option can be used to tell angular-prerender not to render specified routes. The given routes can't contain any parameters.\n\n```shell\nnpx angular-prerender --exclude-routes /do-not-render-1 /do-not-render-2\n```\n\n### --include-routes\n\nThis option can be used to tell angular-prerender to explicitly render the given routes even though they could not be detected automatically.\n\n```shell\nnpx angular-prerender --include-routes /render-even-if-not-detected\n```\n\n### --parameter-values\n\nSome URLs of your app might accept parameters. This option can be used to tell angular-prerender about the possible values those parameters could have. It expects a stringified JSON value which can be described with this TypeScript interface:\n\n```typescript\ninterface IParameterValuesMap {\n    [segment: string]: string | string[] | IParameterValuesMap | IParameterValuesMap[];\n}\n```\n\nLets imagine your app has a route with a `:name` parameter in it: `/team/:name`. A call to angular-prerender like this would render two routes by replacing the parameter with the given values:\n\n```shell\nnpx angular-prerender --parameter-values '{\":name\":[\"amelia\",\"oliver\"]}'\n```\n\n```text\n/team/amelia\n/team/oliver\n```\n\nBy default all possible combinations of all given parameter values will be rendered. If there is a route like this `/blog/:slug/comments/:id` and we render it with two values for each parameter angular-prerender will render four routes.\n\n```shell\nnpx angular-prerender --parameter-values '{\":id\":[\"comment-a\",\"comment-b\"],\":slug\":[\"story-a\",\"story-b\"]}'\n```\n\n```text\n/blog/story-a/comments/comment-a\n/blog/story-a/comments/comment-b\n/blog/story-b/comments/comment-a\n/blog/story-b/comments/comment-b\n```\n\nIf this is not intended and `comment-a` exclusively belongs to `story-a` and `comment-b` belongs to `story-b` respectively the parameter values can be grouped.\n\n```shell\nnpx angular-prerender --parameter-values '[{\":id\":\"comment-a\",\":slug\":\"story-a\"},{\":id\":\"comment-b\",\":slug\":\"story-b\"}]'\n```\n\nIn this case angular-prerender will only renderer two routes.\n\n```text\n/blog/story-a/comments/comment-a\n/blog/story-b/comments/comment-b\n```\n\nIt's also possible to scope parameter values by routes. This comes in handy if the same name is used for different parameters in different routes. If your app has two routes (`/shirts/:id/:size` and `/shoes/:id/:size`) and they both use the same parameters (`:id` and `:size`) it is possible to nest the parameter values to specify a different set of values for each route.\n\n```shell\nnpx angular-prerender --parameter-values '{\"/shirts\":[{\":id\":\"polo-shirt\",\":size\":\"m\"},{\":id\":\"t-shirt\",\":size\":\"xl\"}],\"/shoes\":{\":id\":\"slipper\",\":size\":[\"10\",\"12\"]}}'\n```\n\nIt is not necessary to specify the full route as long as a part of the route is already enough to distinguish it from the other routes.\n\nThe command above will render two routes.\n\n```text\n/shirts/polo-shirt/m\n/shirts/t-shirt/xl\n/shoes/slipper/10\n/shoes/slipper/12\n```\n\nPlease note that it might be necessary to escape the string differently dependending on the command-line interface you use.\n\nIn case there is a prerendered page which links to all possible parameter combinations it might be an alternative to use the [`--recursive`](#--recursive) flag instead.\n\n### --preserve-index-html\n\nSetting this flag to true will preserve the index.html file generated by the browser build. It will be saved in the same directory as start.html. Additionally an existing ngsw.json file will be updated as well to reference the preserved start.html file instead of the prerendered index.html file.\n\n### --recursive\n\nWhen enabling this flag every prerendered HTML document will be scanned to discover further routes. If some of the found routes were previously unknown they get appended to the list of routes to prerender.\n\nIn case any of the newly discovered routes is one of the routes defined with [`--exclude-routes`](#--exclude-routes) it will not be prerendered.\n\n### --scully-config\n\n⚠️ This is currently very experimental and might not work with every possible Scully config. Please feel free to [open an issue](https://github.com/chrisguttandin/angular-prerender/issues/new) if it doesn't accept your config.\n\nThis option allows you to specify a path to a [Scully](https://scully.io) config file. `@scullyio/scully` and the respective plugins need to be installed for this to work. So far only the plugins specified as [`defaultPostRenderers`](https://scully.io/docs/Reference/config/#interface) and plugins of type [`routeProcess`](https://scully.io/docs/Reference/plugins/types/route-process) get applied.\n\n### --target\n\nThis lets you specify the name of the target of your client app. The Angular CLI will normally call it \"build\" and this is also used as a default value. It is also possible to use a full target specifier which does also include the project and an optional configuration separated by colons. This works similar as the target parameter of the [ng run command](https://angular.io/cli/run).\n\n### --verbose (-v)\n\nThis flag enables more detailed log messages.\n\n## Acknowledgement\n\nThis command line tool is only possible by bringing together the great power of [Angular Universal](https://github.com/angular/universal) (which is now included in the [Angular CLI repository](https://github.com/angular/angular-cli)) and [Guess.js](https://github.com/guess-js) (which provides an excellent parser to retrieve the routes of an Angular app).\n","funding_links":[],"categories":["Recently Updated","Architecture and Advanced Topics"],"sub_categories":["[Apr 24, 2024](/content/2024/04/24/README.md)","Server-Side Rendering"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisguttandin%2Fangular-prerender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisguttandin%2Fangular-prerender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisguttandin%2Fangular-prerender/lists"}