mod
mod is a command line tool to quickly scaffold a new Deno project. It requires
deno and optionally git.
Try it without installing anything:
deno run --allow-read --allow-run=git --allow-write https://deno.land/x/mod@v1.0.6/mod.ts -n awesome_deno_projectTable of Contents
Installation
Install the latest stable release from deno.land (or nest.land):
deno install --allow-read --allow-run=git --allow-write -n mod https://deno.land/x/mod@v1.0.6/mod.tsOr install the latest unstable (unreleased) version from GitHub:
deno install --allow-read --allow-run=git --allow-write -n mod https://raw.githubusercontent.com/GJZwiers/mod/main/mod.tsTo upgrade, run the command with a new version number and include -f.
Permissions
mod requires the following permissions
read: to check if files already exists before writingrun=git: to rungitcommands, more specificallygit initwrite: to make files as part of the project initialization
Usage
modThis will create the following file structure in the current working directory:
.
βββ .gitignore
βββ deps.ts
βββ dev_deps.ts
βββ mod.tsNote that mod does not overwrite files unless --force is used explicitly.
This means the program can also be used to βfill in the blanksβ in a directory
where not all of the files above are present yet.
If git is installed on the machine then git init will be run as well.
To create the new module in a new directory:
mod --name my_deno_projectThis will create the following file and directory structure:
.
βββ my_deno_project
| βββ .gitignore
| βββ deps.ts
| βββ dev_deps.ts
| βββ mod.tsOptions
To see what options and flags are available use mod --help if you have the CLI
installed or deno run https://deno.land/x/mod@v1.0.6/mod.ts --help
Contributing
Bug reports and feature requests are very welcome!