LoginSignup
9
0

More than 3 years have passed since last update.

TypeScript x Nuxt x IntelliJのプロジェクト作成手順の自分用メモを晒す

Last updated at Posted at 2019-12-17

初めに

本当にタイトルの通りで、自身の作業メモとして保存してあるテキストを公開するだけのものです
ちょっと恥ずかしい
すべてはQiitaなどからの寄せ集めになっています(一部どこからもってきたかわからなくなってしまいました。。)

本文

$ yarn create nuxt-app sample-firebase-storage-rotate

? Project name 
? Project description 
? Author name 
? Choose the package manager Yarn
? Choose UI framework None
? Choose custom server framework None (Recommended)
? Choose Nuxt.js modules (Press <space> to select, <a> to toggle all, <i> to inv
ert selection)
? Choose linting tools ESLint, Prettier
? Choose test framework Jest
? Choose rendering mode Single Page App
? Choose development tools (Press <space> to select, <a> to toggle all, <i> to i
nvert selection)

$ cd sample-firebase-storage-rotate
$ yarn add ts-node nuxt-property-decorator
$ yarn add @nuxt/typescript-runtime
$ yarn add -D @nuxt/typescript-build

$ yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser
$ yarn add -D vuex-module-decorators
$ yarn add -D @nuxtjs/style-resources
#########################
## 必要に応じて
$ yarn add -D @nuxtjs/vuetify
$ yarn add firebase
$ yarn add dotenv
$ yarn add c3
$ yarn add -D @types/c3
$ yarn add blueimp-load-image

$ touch tsconfig.json
$ mv nuxt.config.js nuxt.config.ts

## 最新にUpdateの意図もあってもう一度
$ npm install -g firebase-tools
  • package.json変更
    • nuxt-ts にするとか,lintの拡張子をjsからtsとか
  • nuxt.config.tsを修正
    • 他Prjからまるっといったんコピペ。こんなの
  • tsconfig.jsonの記述
    • 他Prjからまるっといったんコピペ。こんなの
  • .eslintrc.jsの修正
    • parserをtypescriptに
    • rules追加
  • webpack.config.js.ideaを設置

    • 他Prjからまるっといったんコピペ。こんなの
    • Preferences -> Languages & Frameworks -> JavaScript -> Webpackからconfiguration fileをこれに指定する
  • yarn dev でなんかエラる。なんか依存がおかしい。時間が解決する気もするが

These dependencies were not found:
* core-js/modules/es6.array.find in ./.nuxt/client.js 
* core-js/modules/es6.array.iterator in ./.nuxt/client.js    
 ...
$ yarn add core-js@2.6.9

で回避

  • IntelliJ設定

Preferences->Editor->CodeStyle->TypeScript
Punctuationタブ
Don't use に変更(semicolon to terminate statements)

9
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
9
0