-
Notifications
You must be signed in to change notification settings - Fork 671
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
TypeScript and Vue 3 #4559
TypeScript and Vue 3 #4559
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment in your commit describing what each tsconfig.json
is for is quite useful. It'd be nice to also have that information at the top of each file.
I don't think I fully understand the scope of this PR. Are you just trying to get The Lounge to integrate TS into its build process such that TS can be used, or are you also trying to convert as much of the codebase as possible to fully-typed TS?
https://github.com/microsoft/TypeScript-Babel-Starter/blob/master/tsconfig.json this file can be used as a template to include all comments (including unused options). |
@itsjohncs I was planning to convert the server to typescript and leave the client for incremental changes, but it's looking to be easier to convert everything to typescript to satisfy tsc/eslint/ts-node. There will be a lot left to desire type-wise but it should be a much improved DX experience. That being said, if you and @bookworm would prefer I split the configuration changes into another PR for ease of review I can see how it goes. |
I suspect we'll want to go the "test it a lot" style of review then 😅. This'll be too big of a change to actually audit I'd think. I think whenever you think it's ready we should just land it onto master and then triage and fix any issues over time afterwards. |
Co-authored-by: ts-migrate <>
Co-authored-by: ts-migrate <>
Co-authored-by: ts-migrate <>
Co-authored-by: ts-migrate <>
Co-authored-by: ts-migrate <>
Co-authored-by: ts-migrate <>
Co-authored-by: ts-migrate <>
Co-authored-by: ts-migrate <>
…xist), add comments to getFileFromRelativeToRoot
…ts-node to execute tests
…tring replacement
…er for string replacement" This reverts commit 968a5a6.
This is a wide reaching PR, so to summarize my changes:
extends
webpack.config.ts
yarn build:client
: runswebpack
yarn build:server
: runstsc
to compile the server typescript files tosrc/dist
yarn build
: runsyarn build:*
yarn dev
now evokests-node
to interpret the server side TS on the fly.yarn start
will run the compiled server (insrc/dist
)cross-env
: sets env vars in package.json scripts for multiple platforms (this can probably be removed in the future)@istanbuljs/nyc-config-typescript
)eslint-define-config
,eslint-define-config
ts-loader
,ts-node
,ts-sinon
,addedtsconfig-paths
,tsconfig-paths-webpack-plugin
, which allow webpack/ts files to use path aliases (i.e.@components/
)vuex
to 4.0 (was 3.6.2)vue-draggable
with a hand-rolled Vue component using SortableJS (which vue-draggable uses under the hood)I've also moved us to Vue 3 for proper TypeScript support. We now use the composition API in our components
Sorry for the commit mess, I'll squash before merging. I used
ts-migrate
to try and automate some things but it really just renamed the files for me and made a bunch of commits while doing so.