File tree Expand file tree Collapse file tree 8 files changed +66
-1
lines changed
Expand file tree Collapse file tree 8 files changed +66
-1
lines changed Original file line number Diff line number Diff line change 2424 " src/**/*spec.ts" ,
2525 " src/cdk/schematics/**/*" ,
2626 " src/material/schematics/**/*" ,
27+ " src/google-maps/schematics/**/*" ,
2728 " src/cdk/testing/testbed/zone-types.d.ts" ,
2829 " src/material/_theming.scss" ,
2930 " src/material/index.ts" ,
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ ng_module(
2323ng_package (
2424 name = "npm_package" ,
2525 srcs = ["package.json" ],
26+ nested_packages = ["//src/google-maps/schematics:npm_package" ],
2627 tags = ["release-package" ],
2728 deps = [":google-maps" ],
2829)
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ File any bugs against the [angular/components repo](https://github.com/angular/c
66
77## Installation
88
9- To install, run ` npm install @angular/google-maps` .
9+ To install, run ` ng add @angular/google-maps` .
1010
1111## Getting the API Key
1212
Original file line number Diff line number Diff line change 2626 "rxjs" : " 0.0.0-RXJS"
2727 },
2828 "sideEffects" : false ,
29+ "schematics" : " ./schematics/collection.json" ,
2930 "ng-update" : {}
3031}
Original file line number Diff line number Diff line change 1+ load ("@build_bazel_rules_nodejs//:index.bzl" , "copy_to_bin" )
2+ load ("//tools:defaults.bzl" , "pkg_npm" , "ts_library" )
3+
4+ package (default_visibility = ["//visibility:public" ])
5+
6+ copy_to_bin (
7+ name = "schematics_assets" ,
8+ srcs = glob (["**/*.json" ]),
9+ )
10+
11+ ts_library (
12+ name = "schematics" ,
13+ srcs = glob (
14+ ["**/*.ts" ],
15+ exclude = ["**/*.spec.ts" ],
16+ ),
17+ # Schematics can not yet run in ESM module. For now we continue to use CommonJS.
18+ # TODO(ESM): remove this once the Angular CLI supports ESM schematics.
19+ devmode_module = "commonjs" ,
20+ prodmode_module = "commonjs" ,
21+ deps = [
22+ "@npm//@angular-devkit/schematics" ,
23+ "@npm//@types/node" ,
24+ ],
25+ )
26+
27+ # This package is intended to be combined into the main @angular/google-maps package as a dep.
28+ pkg_npm (
29+ name = "npm_package" ,
30+ deps = [
31+ ":schematics" ,
32+ ":schematics_assets" ,
33+ ],
34+ )
Original file line number Diff line number Diff line change 1+ {
2+ "$schema" : " ../node_modules/@angular-devkit/schematics/collection-schema.json" ,
3+ "schematics" : {
4+ "ng-add" : {
5+ "description" : " Installs the Angular Google Maps module" ,
6+ "factory" : " ./ng-add/index" ,
7+ "hidden" : true
8+ }
9+ }
10+ }
Original file line number Diff line number Diff line change 1+ /**
2+ * @license
3+ * Copyright Google LLC All Rights Reserved.
4+ *
5+ * Use of this source code is governed by an MIT-style license that can be
6+ * found in the LICENSE file at https://angular.io/license
7+ */
8+
9+ import { Rule } from '@angular-devkit/schematics' ;
10+
11+ export default function ( ) : Rule {
12+ // Noop schematic so the CLI doesn't throw if users try to `ng add` this package.
13+ // Also allows us to add more functionality in the future.
14+ return ( ) => { } ;
15+ }
Original file line number Diff line number Diff line change 1+ {
2+ "type" : " commonjs"
3+ }
You can’t perform that action at this time.
0 commit comments