Skip to main content

edcb

edcb is a build tool and task runner for Deno. It has support for formatting, linting, testing, code coverage, bundling, and more, and it can be used via command line or TypeScript import.

License Deno module Github
tag Build Code
coverage

edcb in action

CLI

The edcb CLI can be installed with Deno.

deno install -f -A https://deno.land/x/edcb/cli.ts

After installation, building a project is as simple as running edcb in the project root.

edcb

--ci

The --ci flag changes the behavior as follows:

  1. Runs the Deno formatter with the --check flag.
  2. Generates a test coverage file.
  3. Uploads the test coverage file to codecov.io. This step likely fails on local systems.
edcb --ci

--debug

The --debug flag can be used to display sub-process output. Per default, the output is only logged if the process failed. For example, a developer may use the flag to see the full code coverage report in order to write tests for the missing lines.

edcb --debug

--ignore

The --ignore option can be used to ignore files and directories. It has the same format as the --ignore option of deno fmt and deno lint.

edcb --ignore=deps,docs

Configuration

edcb can be configured with TypeScript. See the dev.ts module for an example. Import the createEdcb function and call one of its methods with custom options. For example, one can specify the ignore option, which will then be used if the --ignore option was not provided:

// NOTE: Change this URL to a specific version of edcb.
import { createEdcb } from "./mod.ts";

// Create an instance.
const edcb = createEdcb();

// Run the build action.
await edcb.build({
  // Specify options.
  ignore: "deps",
});

TODO(not implemented): When edcb is run in a folder with a dev.ts file, it will pass the arguments to deno run -A dev.ts instead. This prevents a developer from accidentally building a project with a local edcb version that differs from the version defined in dev.ts. The GitHub Actions workflow file also runs dev.ts to avoid this problem.