Buckets:
37 GB
4,042,753 files
Updated about 1 month ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| src | 2 items | ||
| tests | 2 items | ||
| CHANGELOG.md | 2.18 kB xet | a0ffbb94 | |
| README.md | 2.26 kB xet | 2ab69b97 | |
| deno.json | 386 Bytes xet | 3748bd97 | |
| mod.ts | 455 Bytes xet | 90d2e902 |
@zuke/knip
Typed Knip CLI task wrapper for Zuke builds — find unused files, dependencies, and exports.
import { KnipTasks } from "@zuke/knip";
await KnipTasks.run((s) => s.production().strict());
API
Full typed API — generated from deno doc
`@zuke/knip` — a typed `KnipTasks` wrapper for the Knip (https://knip.dev)
CLI (unused files, dependencies, and exports), for use in Zuke builds.
```ts
import { KnipTasks } from "@zuke/knip";
await KnipTasks.run((s) => s.production().strict());
```
@module
const KnipTasks: KnipTasksApi
Typed task functions for the `knip` CLI.
class KnipRunSettings extends ToolSettings
Settings for a `knip` run.
override protected defaultTool(): string
The underlying CLI command: `knip`.
override protected defaultResolution(): ToolResolution
Resolve the binary from `node_modules/.bin` by default — knip is an npm-distributed tool.
production(): this
Restrict analysis to production code paths (`--production`).
strict(): this
Treat the production set strictly (`--strict`).
fix(): this
Auto-remove unused exports/dependencies where possible (`--fix`).
cache(): this
Enable the analysis cache (`--cache`).
noExitCode(): this
Always exit 0, even when issues are found (`--no-exit-code`).
config(path: PathLike): this
Use an explicit config file (`--config`).
workspace(name: string): this
Restrict to a single workspace (`--workspace`).
reporter(name: string): this
Choose the reporter, e.g. `json` or `compact` (`--reporter`).
include(...types: string[]): this
Limit to specific issue types, e.g. `files`, `dependencies` (`--include`).
override protected onOutput(output: CommandOutput): void
Report `Issues`, the findings summed over every section, onto the build summary.
override protected buildArgs(): string[]
Assemble the `knip <flags>` argv.
interface KnipTasksApi
The shape of {@link KnipTasks}.
run(configure?: Configure<KnipRunSettings>): Promise<CommandOutput>
Find unused files, dependencies, and exports: `knip`.
- Total size
- 37 GB
- Files
- 4,042,753
- Last updated
- Oct 24
- Pre-warmed CDN
- US EU US EU