{"id":13806774,"url":"https://github.com/dot-build/angular-serve-and-run","last_synced_at":"2025-04-21T03:32:35.298Z","repository":{"id":48216033,"uuid":"396778819","full_name":"dot-build/angular-serve-and-run","owner":"dot-build","description":"Serve your Angular CLI project then run a command on top of it","archived":false,"fork":false,"pushed_at":"2023-07-29T13:31:29.000Z","size":19,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T01:08:38.383Z","etag":null,"topics":["angular","angular-cli"],"latest_commit_sha":null,"homepage":"","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/dot-build.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-16T12:11:22.000Z","updated_at":"2024-04-02T19:05:11.000Z","dependencies_parsed_at":"2024-08-04T01:06:43.619Z","dependency_job_id":"d6d39898-2d30-4611-8b5d-a26b66cb7d84","html_url":"https://github.com/dot-build/angular-serve-and-run","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"fa6febb2b1bf38e06cc2db7c54eaa06367d21917"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dot-build%2Fangular-serve-and-run","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dot-build%2Fangular-serve-and-run/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dot-build%2Fangular-serve-and-run/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dot-build%2Fangular-serve-and-run/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dot-build","download_url":"https://codeload.github.com/dot-build/angular-serve-and-run/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249991174,"owners_count":21357216,"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":["angular","angular-cli"],"created_at":"2024-08-04T01:01:15.999Z","updated_at":"2025-04-21T03:32:35.029Z","avatar_url":"https://github.com/dot-build.png","language":"TypeScript","funding_links":[],"categories":["Angular"],"sub_categories":["CLI Tools"],"readme":"# @dot-build/serve-and-run-angular\n\nServe your Angular project, then run a command.\n\n## Why?\n\nYou want to run a command or test suite after the app is ready. The app takes some time to be ready. The Angular CLI has built-in features to streamline the execution of targets.\n\nUsually, you start your server and run a11y or e2e scenarios on a CI environment.\n\nThis builder allows you to run any command after serve, so you don't need a new module for each and every tool you want to use.\n\n## Usage\n\nInstall the module as a dev dependency:\n\n```sh\nnpm i -D @dot-build/serve-and-run-angular\n```\n\nThen add it to your `angular.json` as a build.\n\nFor example, to run `npm run e2e_ci` after the development server is ready:\n\n```json\n// e2e setup in angular.json\n{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"your-application\": {\n      \"projectType\": \"application\",\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"serve\": {\n          \"builder\": \"@angular-devkit/build-angular:dev-server\",\n          \"options\": {\n            \"browserTarget\": \"your-application:build\"\n          }\n        },\n        \"e2e\": {\n          \"builder\": \"@dot-build/serve-and-run-angular:run\",\n          \"options\": {\n            \"devServerTarget\": \"your-application:serve\",\n            \"command\": \"npm\",\n            \"args\": [\"run\", \"e2e_ci\"]\n          }\n        },\n        \"build\": {\n          // ...\n        }\n      }\n    }\n  }\n}\n```\n\n## Options\n\nFrom `angular.json`, the following can be adjusted:\n\n```json\n// the target to serve\n\"devServerTarget\": \"your-application:serve\",\n\n// name of a command to execute\n\"command\": \"npm\",\n\n// arguments passed to that command\n\"args\": [\"run\", \"e2e_ci\"]\n```\n\nFrom a command-line you can also use the `--watch` option to continuouly run the command after files change. Looking at the previous example, if your angular configuration has a target `e2e` for your tests, and you want to run them over and over, you can do:\n\n```sh\nng run your-application:e2e --watch\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdot-build%2Fangular-serve-and-run","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdot-build%2Fangular-serve-and-run","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdot-build%2Fangular-serve-and-run/lists"}