discoverProject
Looks for the conventional files.
Looks for the conventional files.
Import#
ts
import { discoverProject } from "@shadow-js/dusk/vite";
Signature#
ts
function discoverProject(root: string, srcDir: string): ProjectLayout
Parameters#
| Name | Description |
|---|---|
root |
Project root (absolute). |
srcDir |
Source folder relative to the root. |
Returns#
The layout; missing files are undefined.
Examples#
ts
discoverProject("/app", "src").appFile; // "/app/src/app.tsx" or undefined