| 
									
										
										
										
											2017-12-19 15:03:29 -08:00
										 |  |  | workspace(name = "angular") | 
					
						
							| 
									
										
										
										
											2017-09-25 12:40:22 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-05 12:16:14 -08:00
										 |  |  | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | 
					
						
							| 
									
										
										
										
											2018-12-01 16:08:15 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-22 14:26:52 -07:00
										 |  |  | # Uncomment for local bazel rules development | 
					
						
							|  |  |  | #local_repository( | 
					
						
							|  |  |  | #    name = "build_bazel_rules_nodejs", | 
					
						
							|  |  |  | #    path = "../rules_nodejs", | 
					
						
							|  |  |  | #) | 
					
						
							|  |  |  | #local_repository( | 
					
						
							|  |  |  | #    name = "build_bazel_rules_typescript", | 
					
						
							|  |  |  | #    path = "../rules_typescript", | 
					
						
							|  |  |  | #) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Fetch rules_nodejs so we can install our npm dependencies | 
					
						
							|  |  |  | http_archive( | 
					
						
							|  |  |  |     name = "build_bazel_rules_nodejs", | 
					
						
							| 
									
										
										
										
											2019-02-13 09:47:22 -08:00
										 |  |  |     sha256 = "1416d03823fed624b49a0abbd9979f7c63bbedfd37890ddecedd2fe25cccebc6", | 
					
						
							|  |  |  |     urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.18.6/rules_nodejs-0.18.6.tar.gz"], | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | ) | 
					
						
							| 
									
										
										
										
											2018-11-25 21:13:52 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Use a mock @npm repository while we are building angular from source | 
					
						
							|  |  |  | # downstream. Angular will get its npm dependencies with in @ngdeps which | 
					
						
							|  |  |  | # is setup in ng_setup_workspace(). | 
					
						
							|  |  |  | # TODO(gregmagolan): remove @ngdeps once angular is no longer build from source | 
					
						
							|  |  |  | #   downstream and have build use @npm for npm dependencies | 
					
						
							| 
									
										
										
										
											2018-06-25 11:22:23 -07:00
										 |  |  | local_repository( | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  |     name = "npm", | 
					
						
							|  |  |  |     path = "tools/npm_workspace", | 
					
						
							| 
									
										
										
										
											2018-06-25 11:22:23 -07:00
										 |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Check the bazel version and download npm dependencies | 
					
						
							|  |  |  | load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories") | 
					
						
							| 
									
										
										
										
											2018-05-10 13:12:30 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-04 12:35:57 -08:00
										 |  |  | # Bazel version must be at least v0.21.0 because: | 
					
						
							| 
									
										
										
										
											2019-01-28 10:30:18 -08:00
										 |  |  | #   - 0.21.0 Using --incompatible_strict_action_env flag fixes cache when running `yarn bazel` | 
					
						
							|  |  |  | #            (see https://github.com/angular/angular/issues/27514#issuecomment-451438271) | 
					
						
							| 
									
										
										
										
											2019-01-04 12:35:57 -08:00
										 |  |  | check_bazel_version("0.21.0", """
 | 
					
						
							| 
									
										
										
										
											2018-12-01 16:08:15 -08:00
										 |  |  | You no longer need to install Bazel on your machine. | 
					
						
							|  |  |  | Angular has a dependency on the @bazel/bazel package which supplies it. | 
					
						
							|  |  |  | Try running `yarn bazel` instead. | 
					
						
							|  |  |  |     (If you did run that, check that you've got a fresh `yarn install`) | 
					
						
							| 
									
										
										
										
											2018-08-05 19:10:07 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | """)
 | 
					
						
							| 
									
										
										
										
											2018-09-24 13:58:23 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Setup the Node.js toolchain | 
					
						
							| 
									
										
										
										
											2018-05-10 23:35:21 -07:00
										 |  |  | node_repositories( | 
					
						
							| 
									
										
										
										
											2018-09-24 13:58:23 -07:00
										 |  |  |     node_version = "10.9.0", | 
					
						
							| 
									
										
										
										
											2018-09-11 18:11:32 -07:00
										 |  |  |     package_json = ["//:package.json"], | 
					
						
							|  |  |  |     preserve_symlinks = True, | 
					
						
							| 
									
										
										
										
											2019-02-20 07:07:36 -08:00
										 |  |  |     vendored_yarn = "@angular//third_party/github.com/yarnpkg/yarn/releases/download:v1.13.0", | 
					
						
							| 
									
										
										
										
											2018-05-10 23:35:21 -07:00
										 |  |  | ) | 
					
						
							| 
									
										
										
										
											2018-05-10 13:12:30 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Setup the angular toolchain which installs npm dependencies into @ngdeps | 
					
						
							|  |  |  | load("//tools:ng_setup_workspace.bzl", "ng_setup_workspace") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ng_setup_workspace() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Install all bazel dependencies of the @ngdeps npm packages | 
					
						
							|  |  |  | load("@ngdeps//:install_bazel_dependencies.bzl", "install_bazel_dependencies") | 
					
						
							| 
									
										
										
										
											2018-10-04 13:14:14 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | install_bazel_dependencies() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Load angular dependencies | 
					
						
							|  |  |  | load("//packages/bazel:package.bzl", "rules_angular_dev_dependencies") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | rules_angular_dev_dependencies() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Load karma dependencies | 
					
						
							|  |  |  | load("@build_bazel_rules_karma//:package.bzl", "rules_karma_dependencies") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | rules_karma_dependencies() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Setup the rules_webtesting toolchain | 
					
						
							| 
									
										
										
										
											2019-02-13 09:33:48 -08:00
										 |  |  | load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories") | 
					
						
							| 
									
										
										
										
											2018-05-10 13:12:30 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | web_test_repositories() | 
					
						
							| 
									
										
										
										
											2018-09-24 13:58:23 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-13 09:33:48 -08:00
										 |  |  | # Temporary work-around for https://github.com/angular/angular/issues/28681 | 
					
						
							|  |  |  | # TODO(gregmagolan): go back to @io_bazel_rules_webtesting browser_repositories | 
					
						
							|  |  |  | load("@angular//:browser_repositories.bzl", "browser_repositories") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | browser_repositories() | 
					
						
							| 
									
										
										
										
											2018-05-10 13:12:30 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Setup the rules_typescript tooolchain | 
					
						
							| 
									
										
										
										
											2018-05-10 13:12:30 -07:00
										 |  |  | load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ts_setup_workspace() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Setup the rules_sass toolchain | 
					
						
							| 
									
										
										
										
											2018-04-25 09:23:20 -07:00
										 |  |  | load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories") | 
					
						
							| 
									
										
										
										
											2018-09-24 13:58:23 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-25 09:23:20 -07:00
										 |  |  | sass_repositories() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Setup the skydoc toolchain | 
					
						
							| 
									
										
										
										
											2018-04-25 09:23:20 -07:00
										 |  |  | load("@io_bazel_skydoc//skylark:skylark.bzl", "skydoc_repositories") | 
					
						
							| 
									
										
										
										
											2018-09-24 13:58:23 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-25 09:23:20 -07:00
										 |  |  | skydoc_repositories() |