Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 23572bd

Browse files
committed
chore(monorepo/client): create empty project
1 parent e817a55 commit 23572bd

28 files changed

+1744
-85
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,7 @@ Thumbs.db
4040

4141
.nx/cache
4242
.nx/workspace-data
43+
44+
vite.config.*.timestamp*
45+
vitest.config.*.timestamp*
46+
test-output

.vscode/extensions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"ms-playwright.playwright"
4+
]
5+
}

apps/client-e2e/eslint.config.mjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import playwright from "eslint-plugin-playwright";
2+
import baseConfig from "../../eslint.config.mjs";
3+
4+
export default [
5+
playwright.configs["flat/recommended"],
6+
...baseConfig,
7+
{
8+
files: [
9+
"**/*.ts",
10+
"**/*.js"
11+
],
12+
// Override or add rules here
13+
rules: {}
14+
}
15+
];

apps/client-e2e/package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "@triliumnext/client-e2e",
3+
"version": "0.0.1",
4+
"private": true,
5+
"nx": {
6+
"implicitDependencies": [
7+
"@triliumnext/client"
8+
]
9+
}
10+
}

apps/client-e2e/playwright.config.ts

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import { defineConfig, devices } from '@playwright/test';
2+
import { nxE2EPreset } from '@nx/playwright/preset';
3+
import { workspaceRoot } from '@nx/devkit';
4+
5+
// For CI, you may want to set BASE_URL to the deployed application.
6+
const baseURL = process.env['BASE_URL'] || 'http://localhost:4200';
7+
8+
/**
9+
* Read environment variables from file.
10+
* https://github.com/motdotla/dotenv
11+
*/
12+
// require('dotenv').config();
13+
14+
/**
15+
* See https://playwright.dev/docs/test-configuration.
16+
*/
17+
export default defineConfig({
18+
...nxE2EPreset(__filename, { testDir: './src' }),
19+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
20+
use: {
21+
baseURL,
22+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
23+
trace: 'on-first-retry',
24+
},
25+
/* Run your local dev server before starting the tests */
26+
webServer: {
27+
command: 'npx nx run @triliumnext/client:serve-static',
28+
url: 'http://localhost:4200',
29+
reuseExistingServer: !process.env.CI,
30+
cwd: workspaceRoot
31+
},
32+
projects: [
33+
{
34+
name: "chromium",
35+
use: { ...devices["Desktop Chrome"] },
36+
},
37+
38+
{
39+
name: "firefox",
40+
use: { ...devices["Desktop Firefox"] },
41+
},
42+
43+
{
44+
name: "webkit",
45+
use: { ...devices["Desktop Safari"] },
46+
},
47+
48+
// Uncomment for mobile browsers support
49+
/* {
50+
name: 'Mobile Chrome',
51+
use: { ...devices['Pixel 5'] },
52+
},
53+
{
54+
name: 'Mobile Safari',
55+
use: { ...devices['iPhone 12'] },
56+
}, */
57+
58+
// Uncomment for branded browsers
59+
/* {
60+
name: 'Microsoft Edge',
61+
use: { ...devices['Desktop Edge'], channel: 'msedge' },
62+
},
63+
{
64+
name: 'Google Chrome',
65+
use: { ...devices['Desktop Chrome'], channel: 'chrome' },
66+
} */
67+
],
68+
});

apps/client-e2e/src/example.spec.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { test, expect } from '@playwright/test';
2+
3+
test('has title', async ({ page }) => {
4+
await page.goto('/');
5+
6+
// Expect h1 to contain a substring.
7+
expect(await page.locator('h1').innerText()).toContain('Welcome');
8+
});

apps/client-e2e/tsconfig.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"allowJs": true,
5+
"outDir": "out-tsc/playwright",
6+
"sourceMap": false
7+
},
8+
"include": [
9+
"**/*.ts",
10+
"**/*.js",
11+
"playwright.config.ts",
12+
"src/**/*.spec.ts",
13+
"src/**/*.spec.js",
14+
"src/**/*.test.ts",
15+
"src/**/*.test.js",
16+
"src/**/*.d.ts"
17+
],
18+
"exclude": [
19+
"out-tsc",
20+
"test-output",
21+
"eslint.config.js",
22+
"eslint.config.mjs",
23+
"eslint.config.cjs"
24+
]
25+
}

apps/client/.swcrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"jsc": {
3+
"parser": {
4+
"syntax": "typescript"
5+
},
6+
"target": "es2016"
7+
}
8+
}

apps/client/eslint.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import baseConfig from "../../eslint.config.mjs";
2+
3+
export default [
4+
...baseConfig
5+
];

apps/client/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "@triliumnext/client",
3+
"version": "0.0.1",
4+
"private": true
5+
}

0 commit comments

Comments
 (0)