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 24
24
" src/**/*spec.ts" ,
25
25
" src/cdk/schematics/**/*" ,
26
26
" src/material/schematics/**/*" ,
27
+ " src/google-maps/schematics/**/*" ,
27
28
" src/cdk/testing/testbed/zone-types.d.ts" ,
28
29
" src/material/_theming.scss" ,
29
30
" src/material/index.ts" ,
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ ng_module(
23
23
ng_package (
24
24
name = "npm_package" ,
25
25
srcs = ["package.json" ],
26
+ nested_packages = ["//src/google-maps/schematics:npm_package" ],
26
27
tags = ["release-package" ],
27
28
deps = [":google-maps" ],
28
29
)
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
6
6
7
7
## Installation
8
8
9
- To install, run ` npm install @angular/google-maps` .
9
+ To install, run ` ng add @angular/google-maps` .
10
10
11
11
## Getting the API Key
12
12
Original file line number Diff line number Diff line change 26
26
"rxjs" : " 0.0.0-RXJS"
27
27
},
28
28
"sideEffects" : false ,
29
+ "schematics" : " ./schematics/collection.json" ,
29
30
"ng-update" : {}
30
31
}
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