1.0.99-beta.5 • Published 6 months ago

@webpros/tsxblocklist v1.0.99-beta.5

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Vue3 specific Metafiles

Load the files into the new project folder (not into an already finished one, otherwise the files will be overwritten).

npx degit gisu/vueBoiler --force

If there is no package.json yet, initialize it with npm init. Then install the remaining packages. It is assumed that it is usually an existing Vue or Nuxt project, in which Vite, Typescript, Eslint etc. are already installed.

Install Packages

dependencies

npm i container-query-polyfill @tailwindcss/container-queries

devDependencies

npm i -D @vitejs/plugin-vue @vue/test-utils @vitest/ui vitest @babel/types @types/web-bluetooth vue-tsc postcss postcss-import postcss-nested tailwindcss plop msw jsdom cssnano autoprefixer

Extend script

Then expand the script block of package.json:

"test:e2e": "cypress open",
"test:unit": "vitest run",
"test:unit:watch": "vitest",
"test:unit:ui": "vitest --ui",
"typecheck": "vue-tsc --noEmit",
"plop": "plop"

Vitest

To be able to test the components also via Vitest the vite.config.js must be extended by a test block:

test: {
  include: ['tests/**/*.test.ts', 'src/components/**/*.test.ts', 'src/composables/**/*.test.ts'],
    environment: 'jsdom',
    deps: {
    inline: ['@vue']
  }
}

https://vitest.dev/

Mock Service Worker

It is already prepared, in the file mocks/handlers.js the requests are noted which should be mocked. To connect the service worker:

npx msw init public/ --save

https://mswjs.io/

E2E Tests

Cypress installs relatively easily, the installer helps you with that.

npx cypress open

More info about possible problems

Autoimport

If you want autoimport for Plugins and Components, install the following Packages

npm i -D eslint-import-resolver-typescript unplugin-auto-import unplugin-vue-components

Than uncomment the comments in the eslintrc.js File, and extend the Vite Config in the Plugins section:

import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'

plugins: [
  Components({
    dirs: ['./src/components'],
    dts: true
  }),
  AutoImport({
    dts: './auto-imports.d.ts',
    defaultExportByFilename: false,
    vueTemplate: true,
    include: [
      /\.[tj]sx?$/,
      /\.vue\??/,
      /\.mdx?$/
    ],
    dirs: [
      './src/composables/**',
      './src/utils/**'
    ],
    imports: [
      'vue'
    ],
    eslintrc: {
      enabled: true,
      filepath: './.eslintrc-auto-import.json',
      globalsPropValue: true
    }
  })
]

Than extend the TSConfig with

{
  "files": ["auto-imports.d.ts", "components.d.ts"]
}

Storybook

To use Storybook 7, the following packages must be installed.

npm i -D react react-dom storybook vue-loader eslint-plugin-storybook babel-loader @babel/core @storybook/addon-essentials @storybook/addon-interactions @storybook/addon-links @storybook/blocks @storybook/testing-library @storybook/vue3 @storybook/vue3-vite
1.0.62

10 months ago

1.0.61

10 months ago

1.0.60

10 months ago

1.0.66

10 months ago

1.0.65

10 months ago

1.0.64

10 months ago

1.0.63

10 months ago

1.0.69

10 months ago

1.0.68

10 months ago

1.0.67

10 months ago

1.0.73

10 months ago

1.0.72

10 months ago

1.0.71

10 months ago

1.0.70

10 months ago

1.0.77

10 months ago

1.0.76

10 months ago

1.0.75

10 months ago

1.0.74

10 months ago

1.0.79

10 months ago

1.0.78

10 months ago

1.1.1

7 months ago

1.1.0

8 months ago

1.0.99-beta.3

7 months ago

1.0.99-beta.1

7 months ago

1.0.99-beta.0

7 months ago

1.0.99-beta.5

6 months ago

1.0.99-beta.4

7 months ago

1.0.80

10 months ago

1.0.84

10 months ago

1.0.83

10 months ago

1.0.82

10 months ago

1.0.81

10 months ago

1.0.88

10 months ago

1.0.87

10 months ago

1.0.86

10 months ago

1.0.85

10 months ago

1.0.89

10 months ago

1.0.91

10 months ago

1.0.90

10 months ago

1.0.95

9 months ago

1.0.94

9 months ago

1.0.93

9 months ago

1.0.92

10 months ago

1.0.99

8 months ago

1.0.98

8 months ago

1.0.97

9 months ago

1.0.96

9 months ago

1.0.59

10 months ago

1.0.58

10 months ago

1.0.57

10 months ago

1.0.56

10 months ago

1.0.55

11 months ago

1.0.54

11 months ago

1.0.53

11 months ago

1.0.52

11 months ago

1.0.51

11 months ago

1.0.50

11 months ago

1.0.49

11 months ago

1.0.48

11 months ago

1.0.47

11 months ago

1.0.46

11 months ago

1.0.43

11 months ago

1.0.42

11 months ago

1.0.41

11 months ago

1.0.40

11 months ago

1.0.39

11 months ago

1.0.38

11 months ago

1.0.37

11 months ago

1.0.36

11 months ago

1.0.35

11 months ago

1.0.34

11 months ago

1.0.33

11 months ago

1.0.32

11 months ago

1.0.31

11 months ago

1.0.30

11 months ago

1.0.29

11 months ago

1.0.28

11 months ago

1.0.27

11 months ago

1.0.26

11 months ago

1.0.25

11 months ago

1.0.24

11 months ago

1.0.23

11 months ago

1.0.22

11 months ago

1.0.21

11 months ago

1.0.20

11 months ago

1.0.19

11 months ago

1.0.18

11 months ago

1.0.17

11 months ago

1.0.16

11 months ago

1.0.15

11 months ago

1.0.13

11 months ago

1.0.12

11 months ago

1.0.11

11 months ago

1.0.10

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago