abekoh / blog

https://circleci.com/gh/abekoh/blog
1 stars 0 forks source link

Todoアプリふろんと #61

Closed abekoh closed 4 years ago

abekoh commented 4 years ago

jestのエラー

 SyntaxError: /Users/abekoh/src/github.com/abekoh/workspace-front/store/todo.ts: Support for the experimental syntax 'decorators-legacy' isn't currently enabled (10:1):

       8 | }
       9 | 
    > 10 | @Module({stateFactory: true, namespaced: true, name: 'todo'})
         | ^
      11 | export default class Todo extends VuexModule implements ITodoState {
      12 |   tasks: Task[] = []
      13 | 

これで解決 https://stackoverflow.com/questions/52262084/syntax-error-support-for-the-experimental-syntax-decorators-legacy-isnt-cur

abekoh commented 4 years ago

vuex-module-decoratorsのテスト このあたり参考になる? https://github.com/championswimmer/vuex-module-decorators/blob/ccf4701c5bbbae9438c3b17a4466405fe0cad500/test/getmodule/getmodule_generated_on_two_stores.ts

abekoh commented 4 years ago

webstormでjestの補完有効化 https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000357324-Get-rid-of-Unresolved-function-method-variable-warning-in-Jest-test-files

yarn add -D @types/jest

tsconfigのtypesにも追加

abekoh commented 4 years ago

nuxtでts公式てきなの https://typescript.nuxtjs.org/ja/cookbook/store.html#%E3%82%AF%E3%83%A9%E3%82%B9%E3%83%99%E3%83%BC%E3%82%B9

abekoh commented 4 years ago

Nuxtの$axiosのmock化 https://github.com/nuxt-community/axios-module/issues/105

abekoh commented 4 years ago

テストの参考になりそうなやつ!! https://dev.to/nesterow/testable-code-with-vuejs-and-typescript-4eeb

abekoh commented 4 years ago

↑の色々試したけど、うまくいきそうにないので諦める…

abekoh commented 4 years ago

Vue.jsで親子のやり取り図説 https://orizuru.io/blog/vue-js/vue_emit-props/

abekoh commented 4 years ago

nuxtのssrモードでのデプロイ ソースごと必要そう https://ja.nuxtjs.org/guide/commands/#%E3%82%B5%E3%83%BC%E3%83%90%E3%83%BC%E3%82%B5%E3%82%A4%E3%83%89%E3%83%AC%E3%83%B3%E3%83%80%E3%83%AA%E3%83%B3%E3%82%B0%E3%83%A2%E3%83%BC%E3%83%89%E3%81%AE%E3%83%87%E3%83%97%E3%83%AD%E3%82%A4