Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

build(material): Material MatButton example #201

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 26 additions & 23 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,29 @@ exports_files([
])

filegroup(
name = "node_modules",
srcs = glob(
[
# Include only .js, .json & .d.ts files to reduce the number of
# files in the //:node_modules filegroup
"node_modules/**/*.js",
"node_modules/**/*.json",
"node_modules/**/*.d.ts",
# All the files in the protractor package are necesssary
"node_modules/protractor/**",
# Also include all files in node_modules/.bin
"node_modules/.bin/*",
],
exclude = [
# Exclude files with spaces which are illegal bazel labels
"node_modules/**/* *",
],
) + ["@build_bazel_rules_typescript//:node_modules"],
# "@build_bazel_rules_typescript//:node_modules" is incluced
# in `//:node_modules` so that npm dependencies that are hoisted to
# node_modules/@bazel/typescript/node_modules because of conflicting
# versions can be resolved correctly
)
name = "node_modules",
srcs = glob(["/".join(["node_modules", pkg, "**", ext]) for pkg in [
"@types",
"@ngrx",
"bytebuffer",
"hammerjs",
"jasmine",
"long",
"minimist",
"protobufjs",
"protractor",
"reflect-metadata",
"source-map",
"tsickle",
"tslib",
"tsutils",
"typescript",
"zone.js",
] for ext in [
"*.js",
"*.json",
"*.d.ts",
]] + [
"node_modules/http-server/**",
]) + ["@build_bazel_rules_typescript//:node_modules"],
)
12 changes: 9 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,15 @@ http_archive(
# The @angular repo contains rule for building Angular applications
http_archive(
name = "angular",
url = "https://github.com/angular/angular/archive/6.1.7.zip",
strip_prefix = "angular-6.1.7",
sha256 = "bd6bd47b8b65254da78158b354c4b0ffc18b9591bcc82863e359fc8d3e1cc609",

url = "https://github.com/angular/angular/archive/7.0.0-beta.4.zip",
strip_prefix = "angular-7.0.0-beta.4",
sha256 = "8b124b71b8059c97009de3f20977f7798e80c2f3185fe1d1bb4ed0549baf03e0",
)

local_repository(
name = "material",
path = "../material2",
)

# The @rxjs repo contains targets for building rxjs with bazel
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"zone.js": "0.8.26"
},
"devDependencies": {
"@angular/compiler": "6.1.7",
"@angular/compiler-cli": "6.1.7",
"@angular/core": "6.1.7",
"@angular/compiler": "7.0.0-beta.4",
"@angular/compiler-cli": "7.0.0-beta.4",
"@angular/core": "7.0.0-beta.4",
"@bazel/benchmark-runner": "0.1.0",
"@bazel/ibazel": "0.5.0",
"@bazel/typescript": "0.16.2",
Expand All @@ -22,7 +22,8 @@
"clang-format": "1.2.4",
"husky": "0.14.3",
"protractor": "5.4.1",
"typescript": "2.9.2"
"tsickle": "0.32.1",
"typescript": "3.0.3"
},
"scripts": {
"build": "bazel build //src:bundle",
Expand Down
2 changes: 2 additions & 0 deletions src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ ng_module(
deps = [
"//src/hello-world",
"//src/todos",
"@material//src/lib/button",
"@angular//packages/core",
"@angular//packages/common",
"@angular//packages/router",
],
)
Expand Down
1 change: 1 addition & 0 deletions src/app.component.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<nav><a routerLink="/">Home</a> | <a routerLink="/todos">Todos</a></nav>
<button mat-button>Hello mat-button</button>
<router-outlet></router-outlet>
3 changes: 2 additions & 1 deletion src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {MatButtonModule} from '@angular/material/button';
import {StoreModule} from '@ngrx/store';

import {AppRoutingModule} from './app-routing.module';
Expand All @@ -9,7 +10,7 @@ import {todoReducer} from './reducers/reducers';

@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, AppRoutingModule, StoreModule.forRoot({todoReducer})],
imports: [BrowserModule, AppRoutingModule, StoreModule.forRoot({todoReducer}), MatButtonModule],
exports: [AppComponent],
bootstrap: [AppComponent],
})
Expand Down
58 changes: 37 additions & 21 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,26 @@
# yarn lockfile v1


"@angular/compiler-cli@6.1.7":
version "6.1.7"
resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-6.1.7.tgz#60abdfb3cac6f50d41b2af905a5bfa2bf1f08b36"
"@angular/compiler-cli@7.0.0-beta.4":
version "7.0.0-beta.4"
resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-7.0.0-beta.4.tgz#43ca2c585c903f5c219b7903b2ceabd3d4fb3d48"
dependencies:
chokidar "^1.4.2"
convert-source-map "^1.5.1"
magic-string "^0.25.0"
minimist "^1.2.0"
reflect-metadata "^0.1.2"
tsickle "^0.32.1"
source-map "^0.6.1"

"@angular/compiler@6.1.7":
version "6.1.7"
resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-6.1.7.tgz#cf4e40ec505130710122229481a90ca106bad855"
"@angular/compiler@7.0.0-beta.4":
version "7.0.0-beta.4"
resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-7.0.0-beta.4.tgz#f61a1e15db3e895ea6e8be98a01b261924b87bd7"
dependencies:
tslib "^1.9.0"

"@angular/core@6.1.7":
version "6.1.7"
resolved "https://registry.yarnpkg.com/@angular/core/-/core-6.1.7.tgz#036088227cbff7d3fc7af0c43c5af9db46149f16"
"@angular/core@7.0.0-beta.4":
version "7.0.0-beta.4"
resolved "https://registry.yarnpkg.com/@angular/core/-/core-7.0.0-beta.4.tgz#797edfc2c59bca443eac0a277cde328f3c704b91"
dependencies:
tslib "^1.9.0"

Expand Down Expand Up @@ -348,6 +350,10 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"

convert-source-map@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5"

core-js@~2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.3.0.tgz#fab83fbb0b2d8dc85fa636c4b9d34c75420c6d65"
Expand Down Expand Up @@ -885,6 +891,12 @@ long@~3:
version "3.2.0"
resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b"

magic-string@^0.25.0:
version "0.25.0"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.0.tgz#1f3696f9931ff0a1ed4c132250529e19cad6759b"
dependencies:
sourcemap-codec "^1.4.1"

math-random@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac"
Expand Down Expand Up @@ -967,8 +979,8 @@ nan@^2.9.2:
resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f"

needle@^2.2.1:
version "2.2.2"
resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.2.tgz#1120ca4c41f2fcc6976fd28a8968afe239929418"
version "2.2.1"
resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d"
dependencies:
debug "^2.1.2"
iconv-lite "^0.4.4"
Expand Down Expand Up @@ -1014,8 +1026,8 @@ normalize-path@^2.0.0, normalize-path@^2.0.1:
remove-trailing-separator "^1.0.1"

npm-bundled@^1.0.1:
version "1.0.4"
resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.4.tgz#81ee67cb61f13f6f2dabe6728283ee35a5821829"
version "1.0.3"
resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308"

npm-packlist@^1.1.6:
version "1.1.11"
Expand Down Expand Up @@ -1374,8 +1386,8 @@ signal-exit@^3.0.0:
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"

source-map-support@^0.5.0:
version "0.5.8"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.8.tgz#04f5581713a8a65612d0175fbf3a01f80a162613"
version "0.5.9"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f"
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
Expand All @@ -1390,10 +1402,14 @@ source-map@^0.5.6:
version "0.5.7"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"

source-map@^0.6.0:
source-map@^0.6.0, source-map@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"

sourcemap-codec@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz#c8fd92d91889e902a07aee392bdd2c5863958ba2"

sshpk@^1.7.0:
version "1.14.2"
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98"
Expand Down Expand Up @@ -1501,7 +1517,7 @@ tough-cookie@~2.3.3:
dependencies:
punycode "^1.4.1"

tsickle@^0.32.1:
tsickle@0.32.1:
version "0.32.1"
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.32.1.tgz#f16e94ba80b32fc9ebe320dc94fbc2ca7f3521a5"
dependencies:
Expand Down Expand Up @@ -1535,9 +1551,9 @@ typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"

typescript@2.9.2:
version "2.9.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c"
typescript@3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8"

ultron@~1.1.0:
version "1.1.1"
Expand Down