This is a starter template for building Deno packages in TypeScript, with GitHub Actions-powered CI, tests, CLI, and Semantic Release on GitHub and npm.
- Create a new repository using this template
- Update the project name ("Deno Starter") from the first line in
README.md
- Find and replace "denorg/starter" with your "username/repository" in
README.md
- Update the "Getting started" guide with your exported functions' names
- In
.github/workflows/*.yml
files, add additional permissions afterdeno test
- Setup Semantic Release
- Add a repository secret
NPM_TOKEN
with your npm token - In
.github/workflows/deno.yml
, find and replace "denorg/starter" with your "username/repository"
- Remove this section ("How to use") after setting up your respoitory
If you're not building a Denorg project, the following steps are required too:
- Remove the "A project by Denorg..." footer from
README.md
- Remove the "Made by Denorg" shield from the
README.md
badges section - Change the "Denorg" name to yours in
LICENSE
and under "License" inREADME.md
Import the mode
function and use it:
import { mode } from "https://raw.githubusercontent.com/denorg/starter/master/mod.ts";
const result = mode();
CLI with DPX
After installing DPX, you can directly use the CLI using the dpx
command:
dpx --allow-read starter <arguments>
Alternatively, you can use it directly from the CLI by using deno run
:
deno run --allow-read https://raw.githubusercontent.com/denorg/starter/master/cli.ts <arguments>
You can also install it globally using the following:
deno install --allow-read -n starter https://raw.githubusercontent.com/denorg/starter/master/cli.ts
Then, the package is available to run:
starter <arguments>
Required permissions:
--allow-read
Run tests:
deno test --allow-read
MIT Β© Denorg
A project by Denorg, the world's first Deno-focused community
organization and consulting company. Work with us β