From efdad66c416bb8225e648d028007b19f88289ae6 Mon Sep 17 00:00:00 2001 From: praxxys <65581743+praxxys@users.noreply.github.com> Date: Tue, 8 Mar 2022 13:34:00 +0800 Subject: [PATCH 1/3] Update quickstart.md Currently, the "use Javascript" section is incomplete as Jest is still configured to use Typescript and running `npm run test:unit` will throw errors. The section was revised to to include Jest Javascript configuration changes. --- docs/vue/quickstart.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/vue/quickstart.md b/docs/vue/quickstart.md index 33de936d3f2..22692b810b2 100644 --- a/docs/vue/quickstart.md +++ b/docs/vue/quickstart.md @@ -48,16 +48,18 @@ So, if you’d prefer to use JavaScript instead of TypeScript, you can. After ge npm uninstall --save typescript @types/jest @typescript-eslint/eslint-plugin @typescript-eslint/parser @vue/cli-plugin-typescript @vue/eslint-config-typescript ``` -2. Change all `.ts` files to `.js`. In a blank Ionic Vue app, this should only be `router/index.ts` and `main.ts`. +2. Change all `.ts` files to `.js`. In a blank Ionic Vue app, this should only be `router/index.ts` and `main.ts`. If you're using tests, you also need to rename `tests/unit/example.spec.ts`. 3. Remove `@vue/typescript/recommended` and `@typescript-eslint/no-explicit-any: ‘off’, `from `.eslintrc.js`. 4. Remove `Array` from `router/index.js`. -5. Delete the `shims-vue.d.ts` file. +5. Delete the `shims-vue.d.ts` and `tsconfig.json` files. 6. Remove `lang="ts"` from the `script` tags in any of your Vue components that have them. In a blank Ionic Vue app, this should only be `App.vue` and `views/Home.vue`. +7. In `jest.config.js`, replace `preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel'` with `preset: '@vue/cli-plugin-unit-jest/presets/default'`. + ## A look at a Vue Component The base of our app will be in the `src` directory, and the main entry point will be our `main.ts` file. If we open our project in a code editor and open `main.ts`, we should see the following: From 61460528edd143589aa4378c3cb1a98eb6652716 Mon Sep 17 00:00:00 2001 From: Shawn Taylor Date: Mon, 1 May 2023 17:35:01 -0400 Subject: [PATCH 2/3] Update quickstart --- docs/vue/quickstart.md | 10 ++++------ versioned_docs/version-v5/vue/quickstart.md | 8 ++++---- versioned_docs/version-v6/vue/quickstart.md | 8 ++++---- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/docs/vue/quickstart.md b/docs/vue/quickstart.md index ab5d5c52647..07534e5d683 100644 --- a/docs/vue/quickstart.md +++ b/docs/vue/quickstart.md @@ -48,20 +48,18 @@ So, if you’d prefer to use JavaScript instead of TypeScript, you can. After ge npm uninstall --save typescript @types/jest @typescript-eslint/eslint-plugin @typescript-eslint/parser @vue/cli-plugin-typescript @vue/eslint-config-typescript ``` -2. Change all `.ts` files to `.js`. In a blank Ionic Vue app, this should only be `src/router/index.ts` and `src/main.ts`. If you're using tests, you also need to rename `tests/unit/example.spec.ts`. +2. Change all `.ts` files to `.js`. In a blank Ionic Vue app, this should only be `src/router/index.ts` and `src/main.ts`. If you're using tests, also change the extension of files in the `tests` directory. -3. Remove `@vue/typescript/recommended` and `@typescript-eslint/no-explicit-any: ‘off’, `from `.eslintrc.js`. +3. In `index.html`, change the imported `