Skip to main content

edcb

edcb is a workflow for building a Deno project locally and in a CI environment. Since edcb is itself implemented in TypeScript for Deno, it is used to build itself.

License Deno module Github
tag Build Code
coverage

Motivation

In order to make a Deno project production ready, the code should be formatted, linted, and tested. This workflow is usually very similar across projects. edcb is an attempt of generalizing these tasks across projects and across local systems and CI environments.

Usage

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.

# Formats, lints, and runs tests in the current directory.
edcb

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.

# Prevent formatting or linting of files in the `docs` directory.
edcb --ignore=docs

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, which is the intended behavior.
edcb --ci

Alternatively, one can set the CI environment variable to true (which is done automatically by GitHub Actions).

export CI=true
edcb

The init command generates a set of boilerplate files.

# Generates missing files.
edcb init

# Generates and overwrites files.
edcb init --force