File tree Expand file tree Collapse file tree 6 files changed +64
-0
lines changed
src/material-moment-adapter Expand file tree Collapse file tree 6 files changed +64
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ ng_web_test_suite(
4040ng_package (
4141 name = "npm_package" ,
4242 srcs = ["package.json" ],
43+ nested_packages = ["//src/material-moment-adapter/schematics:npm_package" ],
4344 tags = ["release-package" ],
4445 deps = [":material-moment-adapter" ],
4546)
Original file line number Diff line number Diff line change 2626 " @angular/material-moment-adapter"
2727 ]
2828 },
29+ "schematics" : " ./schematics/collection.json" ,
2930 "sideEffects" : false
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/material-moment-adapter 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 YouTube Player" ,
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