-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Motivation
Maintaining standardized targets across all projects in this repository is essential for consistency and quality. Currently, the apps folder does not fully align with the high standards established in packages.
By bringing apps up to the same standards, we can lock in a stable, maintainable state and introduce more automation to ensure these standards remain high. This benefits all maintainers and contributors by reducing technical debt and improving overall project health.
Problem
- docs, e2e fixtures and e2e test projects are all in one folder
apps - css and scss apps are duplicates besides the
rsbuild.config.tsandrspack.config.tsfile
Suggested Solution
To achieve this, we define a set of must-have targets and ensure the repository is standardised and they are passin:
build- Usingng-rspackexecutorlint- Using@nx/eslintexecutore2e- Using@nx/playwrightexecutorintegration- Using@nx/vitestexecutor
Implementation Details
π Legend:
- π¦ RsPack
- π¦ RsBuild
- π Playwright (e2e testing)
- π ESLint
- π§ͺ Vitest (integration testing)
Current Tree
The current structure has deeply nested directories within apps, making it difficult to maintain consistency across configurations for rsbuild, rspack, eslint, and playwright targets. Each subdirectory contains its own isolated configuration files, leading to duplication and scattered resources.
root
β£β π apps
β β£β π docs
β β£β π eslint.config.ts
β β£β π§ͺ vitest.config.ts
β ββ π¦ rsbuild.config.ts
β£β π rsbuild
β β£β π csr
β β β£β π css
β β β β£β π eslint.config.ts
β β β β£β π§ͺ vitest.config.ts
β β β ββ π¦ rsbuild.config.ts
β β β£β π css-e2e
β β β β£β π eslint.config.ts
β β β ββ π playwright.config.ts
β β β£β π scss
β β β β£β π eslint.config.ts
β β β β£β π§ͺ vitest.config.ts
β β β ββ π¦ rsbuild.config.ts
β β ββ π scss-e2e
β β β£β π eslint.config.ts
β β ββ π playwright.config.ts
β ββ π ssr
β β£β π css
β β β£β π eslint.config.ts
β β β£β π§ͺ vitest.config.ts
β β ββ π¦ rsbuild.config.ts
β ββ π css-e2e
β β£β π eslint.config.ts
β ββ π playwright.config.ts
ββ π rspack
β£β π csr
β ββ π css
β β£β π eslint.config.ts
β β£β π§ͺ vitest.config.ts
β ββ π¦ rspack.config.js
ββ π ssr
ββ π css
β£β π eslint.config.ts
β£β π§ͺ vitest.config.ts
ββ π¦ rspack.config.jsTarget Tree
The new structure separated documentation from testing and centralizes configurations into e2e for all end-to-end testing setups. This reorganization reduces redundancy, and maintenance.
The following things are suggsted:
- align all π¦ and π¦ files to have
.tsextension - move e2e related code into
e2efolder - for each e2e project
- maintain test applications inside
e2e/fixturesand reuse it across the e2e test projects - maintain π¦ and π¦ files inside
e2e/<project>/fixturese.g.e2e/rsbuild-csr-css-e2e/fixtures - autogenerate the final test setup under
tmpand use it inplaywright.config.ts- copy
e2e/fixtures/cssundertmp/e2e/<project> - copy
e2e/rsbuild-csr-css-e2e/fixturesundertmp/e2e/<project> - generate
package.jsonundertmp/e2e/<project>/package.json
- copy
- maintain test applications inside
root
β£β π apps
β ββ π docs
β β£β π eslint.config.ts
β β£β π§ͺ vitest.config.ts
β ββ π¦ rsbuild.config.ts
β£β π e2e
β β£β π fixtures
β β£β π css
β β β£β π eslint.config.ts
β β ββ π§ͺ vitest.config.ts
β ββ π scss
β β£β π eslint.config.ts
β ββ π§ͺ vitest.config.ts
β£β π rsbuild-csr-css-e2e
β β£β π fixtures
β β ββ π¦ rsbuild.config.ts
β β£β π eslint.config.ts
β ββ π playwright.config.ts
β£β π rsbuild-csr-css-e2e
β β£β π fixtures
β β ββ π¦ rsbuild.config.ts
β β£β π eslint.config.ts
β ββ π playwright.config.ts
β£β π rspack-csr-css-e2e
β β£β π fixtures
β β ββ π¦ rspack.config.ts
β β£β π eslint.config.ts
β ββ π playwright.config.ts
ββ π rspack-csr-css-e2e
β£β π fixtures
β ββ π¦ rspack.config.ts
β£β π eslint.config.ts
ββ π playwright.config.tsTodos:
- move e2e projects from
appsintoe2e- e2e: move docs out of e2eΒ #101 - move βdummyβ apps used in e2e tests into
e2e/fixtures- refactor: intro e2e fixturesΒ #104 - reduce duplicate code by composing the dummy app before
e2e- ci: init e2e-fixture-baseΒ #114 - setup
eslintfor fixtures (useπ °οΈ Angular eslint) - ci: introduce specificeslintconfig forpackageande2efolderΒ #105 - setup
eslintfor packages - ci: add lint rules to packagesΒ #125 - setup
eslintforappsfolder (use π Playwright eslint) - ci: introduce specificeslintconfig forpackageande2efolderΒ #105 - refining dummy code to use more relevant features