Giter VIP home page Giter VIP logo

annictor's People

Contributors

angular-cli avatar kasaharu avatar renovate-bot avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

annictor's Issues

AnimeListComponent を router に紐付ける

対応内容

  • AnimeListComponent を router に紐付ける

学習内容

  • <router-outlet> を配置してコンポーネントを出力する
  • RouterTestingModule でテストをする

Service Worker の導入

対応内容

  • Service Worker が動くようにする

学習内容

  • @angular/service-worker をインストールする
$ yarn add @angular/service-worker
$ ng set apps.0.serviceWorker=true
  • AppModule での import
  • Service Worker の設定ファイル ngsw-config.json を配置

今期のアニメ表示ページを作成

対応内容

  • ページを開いたときに今期の情報を表示する

学習内容

  • 期間を扱うサービス(PeriodService)を用意し、今期を計算できるようにする

NgRx を導入して状態管理をする

対応内容

  • NgRx の導入
  • anime の情報を NgRx で管理する
  • Store を介して状態のやり取りをする Container を用意する
  • seasonId を NgRx で管理する

学習内容

各種コマンド

  • パッケージインストール
$ yarn add @ngrx/store
$ yarn add @ngrx/effects
  • RootStoreModule と Store の作成
$ ng g module root-store —-flat false —-module app.module.ts
$ ng g interface root-store/root-state
  • AnimeStoreModule の作成
$ ng g module root-store/anime-store --flat false --module root-store/root-store.module.ts
  • SeasonStoreModule の作成
$ ng g module root-store/season-store --flat false --module root-store/root-store.module.ts

アニメ一覧の対象年度切り替え機能を実装

対応内容

  • SeasonComponent という対象シーズンを切り替えるためのコンポーネントを用意
  • セレクトボックスを切り替えることで選択したシーズンの一覧を表示する

学習内容

  • @Input デコレータを使用し、親コンポーネントからデータを受け取る
  • @Output デコレータを使用し、親コンポーネントへデータを渡す
    • 親へ渡す際には EventEmitter を使用する

SeasonComponent を AnimeListComponent 配下に配置する

対応内容

  • SeasonComponent を AnimeListComponent 配下に配置する
    • AppComponent 配下には AnimeListComponent だけ置くようにする
  • AnimeListComponent は Input を取らないようにする
    • AppComponent に router-outlet をおけるようにしておくため

API_KEY を環境変数から読み取る

対応内容

  • src/environments/templates/ 配下に environment.ts と environment.prod.ts を配置
    • 書き換えたい箇所をプレースホルダーにしておく
  • node script を用意し プレースホルダーの部分に process.env から取得した環境変数をセット
  • npm scripts に prebuild コマンドを用意し TypeScript のコンパイルと実行おこなう

参考

https://qiita.com/TsuyoshiUshio@github/items/4243ee860b217534c0d2

Service Worker の設定を見直す

対応内容

  • Angular v7.x への移行で設定の変更が必要なようなのでみなす
If you use the Angular Service worker, migrate any versionedFiles to the files array. The behavior is the same.

学習内容

  • xxx

Circle CI の導入

TODO

  • Circle CI 上でビルド、テストできるようにする

メモ

  • Circle CI で使うバージョンは circleci/node:8.9.4-stretch-browsers
    • ng test には Browser が必要になるため
  • ng test は single-run で実行するようにする
  • .circleci/config.yml に設定ミスがある場合は CircleCI のページの Workflows から確認できる
    • requires を設定するときはインデントに注意

2018-spring の一覧を取得して表示

TODO

  • 一覧の取得と表示
    • デザインは気にしない

メモ

  • AnimeListComponent 作成
$ ng generate component componets/anime-list
  • AnimeService の作成
$ ng generate service services/anime
  • AnnictModel の作成
$ ng g interface models/Annict

テスト実行時にカバレッジを表示する

対応内容

  • watch false のテスト実行コマンドを npm scripts に登録する
  • テスト実行時にカバレッジを表示するように設定を変更する
  • CircleCI の artifacts にカバレッジを出力する

学習内容

Angular Material の導入

対応内容

  • Angular Material 系のライブラリインストール
$ yarn add @angular/material @angular/cdk
$ yarn add @angular/animations
$ yarn add hammerjs
  • Angular Material のテーマ読み込み
  • Angular Material Icon を使う準備
    • ここ のリンクを import する
    • アイコンは ここ から選べる

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.