On this page ▾
@pangular-inspector/devtools/cli exports, generated from the package source.
@pangular-inspector/devtools/cli
Import from @pangular-inspector/devtools/cli. This page is generated from packages/devtools/src/entries/cli.ts and the files it re-exports. Run pnpm docs:api after you change the public API.
buildReport
Function. Source: packages/devtools/src/build-report.ts.
Writes the static report that pangular build writes, from a script: the
panel with the source scan baked in (components, routes, signals,
providers, pipes, NgRx declarations and build metadata). It does not change
the working directory, so it can run inside a Vite or Analog build hook.
import {buildReport} from '@pangular-inspector/devtools/cli';
await buildReport({outDir: 'dist/devtools-report'});
async function buildReport(options: BuildReportOptions = {}): Promise<BuildReportResult>;
BuildReportOptions
Interface. Source: packages/devtools/src/build-report.ts.
interface BuildReportOptions {
/**
* The folder the report goes into, relative to the working directory.
* Defaults to `dist-static`, as `pangular build` does. The build empties it
* first, so it refuses a folder that is not empty and not a previous report,
* unless `force` is set.
*/
outDir?: string;
/** The project folder the source scans read. Defaults to the working directory. */
root?: string;
/**
* The devtools config. Without it, `pangular.config.json` in `root` is read
* when it exists, as the CLI does.
*/
config?: PangularConfig;
/** Empty `outDir` even when it is not a previous report. */
force?: boolean;
/** Pretty-print the JSON files of the report, to read or diff them by hand. */
pretty?: boolean;
/** A folder with a panel build to copy instead of the one this package ships. */
distDir?: string;
}
BuildReportResult
Interface. Source: packages/devtools/src/build-report.ts.
interface BuildReportResult {
/** The absolute path of the report folder. */
outDir: string;
/** The absolute path of the project folder that was scanned. */
root: string;
}
createPangularCli
Function. Source: packages/devtools/src/cli.ts.
The pangular command line: dev (the default), build, mcp, skills
and lint, with --root, --config and --read-only on each.
function createPangularCli(options: PangularCliOptions = {}): {
cli: CAC;
parse(argv?: string[]): Promise<void>;
};
DEFAULT_REPORT_DIR
Constant. Source: packages/devtools/src/build-report.ts.
Where buildReport() and pangular build write the report when no folder is given.
const DEFAULT_REPORT_DIR: 'dist-static';
PangularCliOptions
Interface. Source: packages/devtools/src/cli.ts.
interface PangularCliOptions {
env?: Env;
log?: (message: string) => void;
}