https://github.com/eibens/edcb
A build tool and task runner for Deno.
https://github.com/eibens/edcb
build ci deno formatting github-actions linting testing typescript
Last synced: 3 months ago
JSON representation
A build tool and task runner for Deno.
- Host: GitHub
- URL: https://github.com/eibens/edcb
- Owner: eibens
- License: mit
- Created: 2021-06-20T15:39:25.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-30T17:24:34.000Z (over 3 years ago)
- Last Synced: 2025-02-27T02:44:25.563Z (4 months ago)
- Topics: build, ci, deno, formatting, github-actions, linting, testing, typescript
- Language: TypeScript
- Homepage:
- Size: 768 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# [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)
[](https://deno.land/x/edcb)
[](https://github.com/eibens/edcb)
[](https://github.com/eibens/edcb/actions/workflows/ci.yml)
[](https://codecov.io/gh/eibens/edcb)
# Features
- Formatting, linting, and testing of TypeScript code.
- Configurable HTTP server for developing web apps.
- File watcher with automatic reload via WebSockets.
- Dynamic generation of JavaScript bundles from TypeScript modules.
- Optional coverage file generation and upload to [codecov.io].
- CLI with rich diagnostic output (sub-processes, call-tree, performance).
- TypeScript API for [configuration and version locking](#config).
- Easy CI integration (see [ci.yml](.github/workflows/ci.yml)).# Usage
Install the [edcb] CLI with [Deno]:
```sh
deno install -f -A --unstable https://deno.land/x/edcb/cli.ts
```These are basic commands:
```sh
# show help text
edcb --help# run formatter, linter, tests, and bundler
edcb build# start development server
edcb serve
```## Config
Before it does anything else, [edcb] will look for the [dev.ts](dev.ts) module
in the working directory and run it if it exists. This allows one to lock a
particular [edcb] version to a project, provide default values for options, and
add complex configuration such as the `bundles` option. The `edcb` CLI then
essentially becomes an alias for this:```sh
deno run -A --unstable dev.ts [...args]
```The [mod.ts](mod.ts) module exports the `cli` function, which can be used to run
the CLI using TypeScript. The specified options are used as defaults. For
example, one can specify the `ignore` option, which will then be used if the
`--ignore` option was not provided on the command-line. This is an example of a
`dev.ts` file that uses [edcb]'s TypeScript API:```ts
/**
* Always import a specific version of edcb.
* Otherwise, your builds might break when edcb updates.
*
* @example
* import { cli } from "https://deno.land/x/[email protected]/mod.ts";
*/
import { cli } from "./mod.ts";await cli({
ignore: "index.js",
reload: true,
bundles: [{
source: "index.ts",
target: "index.js",
}],
});
```[edcb]: #
[Deno]: https://deno.land
[codecov.io]: https://codecov.io