LoginSignup
1
0

More than 3 years have passed since last update.

Angular CLI でワークスペース作成後にやること

Last updated at Posted at 2019-05-11

prettierの設定ファイルの作成

touch src/prettierrc.json
{
  "singleQuote": true,
  "trailingComma": "all",
  "arrowParens": "always"
}

Font Awesome を install

方法はいくつかあるが、Font Awesome公式ドキュメントのやり方で
https://fontawesome.com/how-to-use/on-the-web/using-with/angular

yarn add @fortawesome/fontawesome-svg-core @fortawesome/free-solid-svg-icons @fortawesome/angular-fontawesome

install後、src/app.module.ts のimportsにFontAwesomeModuleを追加

normalize.cssをinstall

yarn add normalize.css

angular.jsonのprojects.[project name].architect.build.options.stylesにyarn addしたnormalize.cssを追加

"styles": [
  "src/styles.scss",
  "./node_modules/normalize.css/normalize.css"
],

Webフォントの追加

最初はとりあえずNoto Sans JPを追加。
src/index.htmlのheadに追記

<link href="https://fonts.googleapis.com/css?family=Noto+Sans+JP" rel="stylesheet">

src/style.scssでfont-familyの設定

html,
body {
  font-family: 'Noto Sans Jp';
}
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0