Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frontendのリファクタリング #355

Merged
merged 24 commits into from
Jun 7, 2019
Merged

Conversation

kobakazu0429
Copy link
Member

@kobakazu0429 kobakazu0429 commented Jun 5, 2019

WHY

乱雑になってきていたので一回整理したかった

WHAT

やったこと

prettier

  • printWidth: 120 -> 80

webpack

  • add alias: @
  • ForkTsCheckerWebpackPlugin (for speed up)
  • change typescript loader: awesome-typescript-loader -> ts-loader
  • add pre loader: tslint-loader

package.json

  • add lint-staged: if added file is *.{js,ts,tsx}, yarn lint && git add
  • removed babel: be replaced typescript(webpack) look: tsconfig.json
  • some package updated

tsconfig.json

  • change compilerOptions. module: commonjs -> es2015

all source code

  • be importable: import * as React from 'react" -> import React from 'react"

directory architecture

  • change directory name: frontend/src/entries/ -> frontend/src/pages/
  • change directory name: frontend/src/commons/ -> frontend/src/constants/
  • add directory in frontend/src/components/ : frontend/src/components/atoms
  • add directory in frontend/src/components/ : frontend/src/components/molecules

etc

  • remove: goodSpace
  • remove .postcssrc.yml
  • add /frontend/README.md

やってないこと

@kobakazu0429
Copy link
Member Author

typescriptで対応できると思ったのでbabel周り一旦無くしました
最終リリース時にテストしてみてIEダメだったらまた入れます

@kobakazu0429 kobakazu0429 requested a review from euglena1215 June 7, 2019 02:22
import { chkColors } from "./../commons/color";
import ChkButtonBase from "./../commons/ChkButtonBase";
import { color, device } from "@/constants/styles";
import ChkButtonBase from "@/components/atoms/Buttons/ChkButtonBase";
Copy link
Member Author

@kobakazu0429 kobakazu0429 Jun 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こんな感じで @ を使ってimportできるようになりました
../../みたいに相対指定しなくて大丈夫です

Copy link
Member

@euglena1215 euglena1215 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

全部把握しきれないので信じる気持ちを胸にApproveします

@kobakazu0429
Copy link
Member Author

嬉しい

@kobakazu0429 kobakazu0429 merged commit 9e007f8 into feature/react Jun 7, 2019
@kobakazu0429 kobakazu0429 deleted the refactoring/frontend branch June 7, 2019 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants