Skip to content
This repository has been archived by the owner on Nov 28, 2020. It is now read-only.

Review dependencies and examples, make Vuex more explicit with TypeScript #16

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

renoirb
Copy link

@renoirb renoirb commented May 28, 2019

Objective

The Vuex Mutations, Actions and Getters looks like they’ve been done in a hurry.
Also, lots of getters are hard-coded in the components directly.

I feel this project is about a "reference usage example" on how to use Nuxt.js with TypeScript.

Let's rework the Vuex modules.

There aren't much properly shown examples of Nuxt with TypeScript checked Vuex modules.

Maybe we need something similar to what's shown in this StackOverflow question (using championswimmer/vuex-module-decorators, codesandbox) or maybe we don't need. It looks like docs example about using TypeScript for vuex nuxtjs.org/examples/typescript-vuex

Summary

  • Review pages to be using TypeScript more
  • Make Vuex work with strictly typed Mutations, Actions, etc.
  • Setup/Review Axios to leverage @nuxtjs/axios
  • Review Prettier and VSCode setup
  • Make @nuxtjs/axios to use NUXT_ENV_... environment variable to flip which API endpoint to call
  • There was an issue with Prettier configuration
  • Setup VSCode Debuging tools
  • TypeScript VSCode bindings with current TypeScript version (e.g. in .vscode/settings.json, add {"typescript.tsdk": "node_modules/typescript/lib"}
  • Illustrate how to use Debugger and builder only using VSCode instead of CLI
  • Change data source origin and fix broken views issues
  • Separate configuration options into modules, add them into nuxt.config.js

Next (?)

  • Setup/Review serverMiddleware (Express) to cache HackerNews backend response (?)
  • Use configuration management (e.g. convict)

Review

Make sure we can run the following properly, without errors:

  1. Unit tests
  2. As mode: "spa", after nuxt build, and nuxt start
  3. As mode: "universal", after nuxt build, and nuxt start
  4. Properly see we can see filesystem cache of origin responses (isn’t what Express API Cache is for?)

@renoirb renoirb force-pushed the renoirb/vuex-modules branch 2 times, most recently from 14333c4 to 343cc45 Compare May 30, 2019 03:50
@renoirb renoirb changed the title WIP: Review dependencies and examples, make Vuex more explicit with TypeScript Review dependencies and examples, make Vuex more explicit with TypeScript Jun 6, 2019
Vuex Module that are strongly typed with TypeScript

* Make PWA optional, refactor comment folding.
* Review README
* Figure out how static/sw.js works (need documentation)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant