Skip to content

Commit 3995279

Browse files
committed
feat: implement landing page
1 parent caf4b8b commit 3995279

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2736
-89
lines changed

.verdaccio/config.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# path to a directory with all packages
2+
storage: ../tmp/local-registry/storage
3+
4+
# a list of other known repositories we can talk to
5+
uplinks:
6+
npmjs:
7+
url: https://registry.npmjs.org/
8+
maxage: 60m
9+
10+
packages:
11+
'**':
12+
# give all users (including non-authenticated users) full access
13+
# because it is a local registry
14+
access: $all
15+
publish: $all
16+
unpublish: $all
17+
18+
# if package is not available locally, proxy requests to npm registry
19+
proxy: npmjs
20+
21+
# log settings
22+
log:
23+
type: stdout
24+
format: pretty
25+
level: warn
26+
27+
publish:
28+
allow_offline: true # set offline to true to allow publish offline

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"angular.ng-template",
44
"nrwl.angular-console",
55
"esbenp.prettier-vscode",
6-
"dbaeumer.vscode-eslint"
6+
"dbaeumer.vscode-eslint",
7+
"ms-playwright.playwright"
78
]
89
}

apps/docs-e2e/eslint.config.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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: ['**/*.ts', '**/*.js'],
9+
// Override or add rules here
10+
rules: {},
11+
},
12+
];

apps/docs-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: 'pnpm exec nx run docs:serve',
28+
url: 'http://localhost:4200',
29+
reuseExistingServer: true,
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/docs-e2e/project.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "docs-e2e",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"projectType": "application",
5+
"sourceRoot": "apps/docs-e2e/src",
6+
"implicitDependencies": ["docs"],
7+
"// targets": "to see all targets run: nx show project docs-e2e --web",
8+
"targets": {}
9+
}

apps/docs-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/docs-e2e/tsconfig.json

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

apps/docs/eslint.config.mjs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import nx from '@nx/eslint-plugin';
2+
import baseConfig from '../../eslint.config.mjs';
3+
4+
export default [
5+
...baseConfig,
6+
...nx.configs['flat/angular'],
7+
...nx.configs['flat/angular-template'],
8+
{
9+
files: ['**/*.ts'],
10+
rules: {
11+
'@angular-eslint/directive-selector': [
12+
'error',
13+
{
14+
type: 'attribute',
15+
prefix: 'app',
16+
style: 'camelCase',
17+
},
18+
],
19+
'@angular-eslint/component-selector': [
20+
'error',
21+
{
22+
type: 'element',
23+
prefix: 'app',
24+
style: 'kebab-case',
25+
},
26+
],
27+
},
28+
},
29+
{
30+
files: ['**/*.html'],
31+
// Override or add rules here
32+
rules: {},
33+
},
34+
];

apps/docs/postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
'@tailwindcss/postcss': {},
4+
autoprefixer: {},
5+
},
6+
};

apps/docs/project.json

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"name": "docs",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"projectType": "application",
5+
"prefix": "app",
6+
"sourceRoot": "apps/docs/src",
7+
"tags": [],
8+
"targets": {
9+
"build": {
10+
"executor": "@angular/build:application",
11+
"outputs": ["{options.outputPath}"],
12+
"options": {
13+
"outputPath": "dist/apps/docs",
14+
"browser": "apps/docs/src/main.ts",
15+
"tsConfig": "apps/docs/tsconfig.app.json",
16+
"assets": [
17+
{
18+
"glob": "**/*",
19+
"input": "apps/docs/public"
20+
}
21+
],
22+
"styles": ["apps/docs/src/styles.css"]
23+
},
24+
"configurations": {
25+
"production": {
26+
"budgets": [
27+
{
28+
"type": "initial",
29+
"maximumWarning": "500kb",
30+
"maximumError": "1mb"
31+
},
32+
{
33+
"type": "anyComponentStyle",
34+
"maximumWarning": "4kb",
35+
"maximumError": "8kb"
36+
}
37+
],
38+
"outputHashing": "all"
39+
},
40+
"development": {
41+
"optimization": false,
42+
"extractLicenses": false,
43+
"sourceMap": true
44+
}
45+
},
46+
"defaultConfiguration": "production"
47+
},
48+
"serve": {
49+
"continuous": true,
50+
"executor": "@angular/build:dev-server",
51+
"configurations": {
52+
"production": {
53+
"buildTarget": "docs:build:production"
54+
},
55+
"development": {
56+
"buildTarget": "docs:build:development"
57+
}
58+
},
59+
"defaultConfiguration": "development"
60+
},
61+
"lint": {
62+
"executor": "@nx/eslint:lint"
63+
},
64+
"test": {
65+
"executor": "@angular/build:unit-test",
66+
"options": {}
67+
},
68+
"serve-static": {
69+
"continuous": true,
70+
"executor": "@nx/web:file-server",
71+
"options": {
72+
"buildTarget": "docs:build",
73+
"port": 4200,
74+
"staticFilePath": "dist/apps/docs/browser",
75+
"spa": true
76+
}
77+
}
78+
}
79+
}

0 commit comments

Comments
 (0)