- v1.0.0-alpha.8Latest
- v1.0.0-alpha.7
- v1.0.0-alpha.6
- v1.0.0-alpha.5
- v1.0.0-alpha.4
- v1.0.0-alpha.3
- v1.0.0-alpha.2
- v1.0.0-alpha.1
- v1.0.0-alpha
- v0.9.0-alpha.2
- v0.9.0-alpha.1
- v0.9.0-alpha
- v0.8.0
- v0.8.0-alpha.1
- v0.8.0-alpha
- v0.7.1
- v0.7.1-alpha
- v0.7.0
- v0.6.1
- v0.6.0
- v0.6.0-alpha
- v0.5.1
- v0.5.0
- v0.4.1
- v0.4.0
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.0
- v0.1.0
- v0.0.1
- v0.0.0
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.
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.
Install
The edcb CLI can be installed with Deno.
deno install -f -A https://deno.land/x/edcb/cli.ts
The edcb version can be specified in the URL.
# Replace {ref} with the desired Git tag or branch.
deno install -f -A https://deno.land/x/edcb@{ref}/cli.ts
Usage
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:
- Runs the Deno formatter with the
--check
flag. - Generates a test coverage file.
- 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 ci.yml workflow file demonstrates how edcb can
be used with GitHub Actions. The init
command generates the workflow file
automatically.
# Generates the workflow file for GitHub Actions.
edcb init