create-nuxt-base 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/nuxt-base-template/nuxt.config.ts +2 -1
- package/nuxt-base-template/package-lock.json +590 -513
- package/nuxt-base-template/package.json +18 -20
- package/nuxt-base-template/playwright.config.ts +31 -65
- package/nuxt-base-template/tests/init.spec.ts +6 -0
- package/package.json +1 -1
- package/nuxt-base-template/e2e/init.spec.ts +0 -18
- package/nuxt-base-template/src/tests/init.test.ts +0 -12
- package/nuxt-base-template/vitest.config.js +0 -10
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-base-template",
|
|
3
3
|
"private": true,
|
|
4
|
+
"type": "module",
|
|
4
5
|
"scripts": {
|
|
5
6
|
"init": "npm install",
|
|
6
7
|
"reinit": "rm -rf node_modules && rm -rf package-lock.json && yes | npx nuxt cleanup && npm cache clean --force && npm i",
|
|
@@ -18,8 +19,7 @@
|
|
|
18
19
|
"generate": "nuxt generate",
|
|
19
20
|
"preview": "nuxt preview",
|
|
20
21
|
"postinstall": "nuxt prepare",
|
|
21
|
-
"test": "
|
|
22
|
-
"test:watch": "vitest",
|
|
22
|
+
"test:e2e": "playwright test",
|
|
23
23
|
"lint": "eslint --ext .ts,.js,.vue .",
|
|
24
24
|
"lint:fix": "eslint --ext .ts,.js,.vue . --fix",
|
|
25
25
|
"postbuild": "cd .output/server/node_modules/tslib; npm pkg set 'exports[.].import.node'='./tslib.es6.mjs'"
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@egoist/tailwindcss-icons": "1.8.1",
|
|
29
29
|
"@iconify-json/bi": "1.2.0",
|
|
30
|
-
"@lenne.tech/nuxt-base": "3.
|
|
30
|
+
"@lenne.tech/nuxt-base": "3.21.0",
|
|
31
31
|
"@nuxt/image": "1.8.0",
|
|
32
32
|
"@vee-validate/yup": "4.13.2",
|
|
33
|
-
"@vueuse/core": "11.0
|
|
34
|
-
"@vueuse/integrations": "11.0
|
|
35
|
-
"@vueuse/nuxt": "11.0
|
|
33
|
+
"@vueuse/core": "11.1.0",
|
|
34
|
+
"@vueuse/integrations": "11.1.0",
|
|
35
|
+
"@vueuse/nuxt": "11.1.0",
|
|
36
36
|
"ios-pwa-splash": "1.0.0",
|
|
37
37
|
"pinia": "2.2.2",
|
|
38
38
|
"tailwind-merge": "2.5.2",
|
|
@@ -40,31 +40,29 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@lenne.tech/eslint-config-vue": "0.0.16",
|
|
43
|
-
"@nuxt/devtools": "1.
|
|
44
|
-
"@nuxt/test-utils": "3.14.
|
|
45
|
-
"@nuxtjs/color-mode": "3.
|
|
43
|
+
"@nuxt/devtools": "1.5.1",
|
|
44
|
+
"@nuxt/test-utils": "3.14.2",
|
|
45
|
+
"@nuxtjs/color-mode": "3.5.1",
|
|
46
46
|
"@nuxtjs/google-fonts": "3.2.0",
|
|
47
47
|
"@nuxtjs/plausible": "1.0.2",
|
|
48
|
-
"@nuxtjs/
|
|
48
|
+
"@nuxtjs/robots": "4.1.7",
|
|
49
|
+
"@nuxtjs/sitemap": "6.1.1",
|
|
49
50
|
"@nuxtjs/tailwindcss": "6.12.1",
|
|
50
|
-
"@playwright/test": "1.
|
|
51
|
-
"@tailwindcss/forms": "0.5.
|
|
51
|
+
"@playwright/test": "1.47.2",
|
|
52
|
+
"@tailwindcss/forms": "0.5.9",
|
|
52
53
|
"@tailwindcss/typography": "0.5.15",
|
|
53
|
-
"@types/node": "22.
|
|
54
|
-
"@vitejs/plugin-vue": "5.1.
|
|
54
|
+
"@types/node": "22.7.4",
|
|
55
|
+
"@vitejs/plugin-vue": "5.1.4",
|
|
55
56
|
"@vue/test-utils": "2.4.6",
|
|
56
|
-
"eslint": "9.
|
|
57
|
+
"eslint": "9.11.1",
|
|
57
58
|
"jsdom": "24.1.3",
|
|
58
|
-
"nuxt": "3.13.
|
|
59
|
-
"nuxt-simple-robots": "4.0.1",
|
|
59
|
+
"nuxt": "3.13.2",
|
|
60
60
|
"ts-loader": "9.5.1",
|
|
61
|
-
"typescript": "5.
|
|
62
|
-
"vitest": "2.0.5"
|
|
61
|
+
"typescript": "5.6.2"
|
|
63
62
|
},
|
|
64
63
|
"overrides": {
|
|
65
64
|
"vue": "latest",
|
|
66
65
|
"@nuxt/test-utils": {
|
|
67
|
-
"vitest": "$vitest",
|
|
68
66
|
"happy-dom": "13.0.0"
|
|
69
67
|
},
|
|
70
68
|
"@lenne.tech/eslint-config-vue": {
|
|
@@ -1,77 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { fileURLToPath } from 'node:url'
|
|
2
|
+
import { defineConfig, devices } from '@playwright/test'
|
|
3
|
+
import type { ConfigOptions } from '@nuxt/test-utils/playwright'
|
|
4
|
+
import { isCI, isWindows } from 'std-env'
|
|
5
|
+
|
|
6
|
+
const devicesToTest = [
|
|
7
|
+
'Desktop Chrome',
|
|
8
|
+
// Test against other common browser engines.
|
|
9
|
+
// 'Desktop Firefox',
|
|
10
|
+
// 'Desktop Safari',
|
|
11
|
+
// Test against mobile viewports.
|
|
12
|
+
// 'Pixel 5',
|
|
13
|
+
// 'iPhone 12',
|
|
14
|
+
// Test against branded browsers.
|
|
15
|
+
// { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
16
|
+
// { ...devices['Desktop Chrome'], channel: 'chrome' },
|
|
17
|
+
] satisfies Array<string | typeof devices[string]>
|
|
18
|
+
|
|
19
|
+
/* See https://playwright.dev/docs/test-configuration. */
|
|
20
|
+
export default defineConfig<ConfigOptions>({
|
|
21
|
+
testDir: './tests',
|
|
14
22
|
/* Run tests in files in parallel */
|
|
15
23
|
fullyParallel: true,
|
|
16
24
|
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
17
|
-
forbidOnly: !!
|
|
25
|
+
forbidOnly: !!isCI,
|
|
18
26
|
/* Retry on CI only */
|
|
19
|
-
retries:
|
|
27
|
+
retries: isCI ? 2 : 0,
|
|
20
28
|
/* Opt out of parallel tests on CI. */
|
|
21
|
-
workers:
|
|
29
|
+
workers: isCI ? 1 : undefined,
|
|
30
|
+
timeout: isWindows ? 60000 : undefined,
|
|
22
31
|
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
23
32
|
reporter: 'html',
|
|
24
33
|
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
25
34
|
use: {
|
|
26
|
-
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
27
|
-
// baseURL: 'http://127.0.0.1:3000',
|
|
28
|
-
|
|
29
35
|
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
30
36
|
trace: 'on-first-retry',
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
projects: [
|
|
35
|
-
{
|
|
36
|
-
name: 'chromium',
|
|
37
|
-
use: { ...devices['Desktop Chrome'] },
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
{
|
|
41
|
-
name: 'firefox',
|
|
42
|
-
use: { ...devices['Desktop Firefox'] },
|
|
37
|
+
/* Nuxt configuration options */
|
|
38
|
+
nuxt: {
|
|
39
|
+
rootDir: fileURLToPath(new URL('.', import.meta.url)),
|
|
43
40
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
use: { ...devices['Desktop Safari'] },
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
/* Test against mobile viewports. */
|
|
51
|
-
// {
|
|
52
|
-
// name: 'Mobile Chrome',
|
|
53
|
-
// use: { ...devices['Pixel 5'] },
|
|
54
|
-
// },
|
|
55
|
-
// {
|
|
56
|
-
// name: 'Mobile Safari',
|
|
57
|
-
// use: { ...devices['iPhone 12'] },
|
|
58
|
-
// },
|
|
59
|
-
|
|
60
|
-
/* Test against branded browsers. */
|
|
61
|
-
// {
|
|
62
|
-
// name: 'Microsoft Edge',
|
|
63
|
-
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
64
|
-
// },
|
|
65
|
-
// {
|
|
66
|
-
// name: 'Google Chrome',
|
|
67
|
-
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
|
68
|
-
// },
|
|
69
|
-
],
|
|
70
|
-
|
|
71
|
-
/* Run your local dev server before starting the tests */
|
|
72
|
-
// webServer: {
|
|
73
|
-
// command: 'npm run start',
|
|
74
|
-
// url: 'http://127.0.0.1:3000',
|
|
75
|
-
// reuseExistingServer: !process.env.CI,
|
|
76
|
-
// },
|
|
77
|
-
});
|
|
41
|
+
},
|
|
42
|
+
projects: devicesToTest.map(p => typeof p === 'string' ? ({ name: p, use: devices[p] }) : p),
|
|
43
|
+
})
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { expect, test } from '@nuxt/test-utils/playwright'
|
|
2
|
+
|
|
3
|
+
test('init test', async ({ page, goto }) => {
|
|
4
|
+
await goto('https://lenne.tech', { waitUntil: 'domcontentloaded' })
|
|
5
|
+
await expect(page.getByRole('heading', { name: 'Wir unterstützen Dich!' })).toHaveText('Wir unterstützen Dich!')
|
|
6
|
+
})
|
package/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { test, expect } from '@playwright/test';
|
|
2
|
-
|
|
3
|
-
test('has title', async ({ page }) => {
|
|
4
|
-
await page.goto('https://playwright.dev/');
|
|
5
|
-
|
|
6
|
-
// Expect a title "to contain" a substring.
|
|
7
|
-
await expect(page).toHaveTitle(/Playwright/);
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
test('get started link', async ({ page }) => {
|
|
11
|
-
await page.goto('https://playwright.dev/');
|
|
12
|
-
|
|
13
|
-
// Click the get started link.
|
|
14
|
-
await page.getByRole('link', { name: 'Get started' }).click();
|
|
15
|
-
|
|
16
|
-
// Expects page to have a heading with the name of Installation.
|
|
17
|
-
await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
|
|
18
|
-
});
|