init
deno-init
initializes a Deno configuration file from the command line.
Previous versions also initialized entrypoints, but that functionality has been moved to a different project. From v2 onwards this module is purely for generating config.
Table of Contents
Installation
deno install --allow-read --allow-write -fn deno-init https://deno.land/x/init@v2.3.0/mod.ts
Usage
Make a config file based on a number of prompts:
deno-init
Skip the prompts, use all defaults:
deno-init --yes
Add every possible option in comments (as a .jsonc
file)
deno-init --fill
Options
--help
or -h
will print the CLI documentation to the terminal.
--yes
or -y
will skip the prompts and initialize the file in the current
working directory with default values:
deno-init --yes
--fill
or -i
will create a deno.jsonc
config file with all the possible
configuration options listed as comments. This style is very similar to the
output of tsc --init
for generating a tsconfig.json
.
deno-init --fill
--fmt
or -m
will add a fmt
section only.
deno-init --fmt
--lint
or -l
will add a lint
section only.
deno-init --lint
--tsconfig
or -t
will add a compilerOptions
section only.
deno-init --tsconfig
--name
or -n
will use a non-default name for the config file. The default
name is deno.json
. Note that using a non-default name may prevent config file
auto-discovery.
deno-init --name config.json
--force
or -f
will allow overwriting an existing config file.
Contributing
You are welcome to report any bugs, other issues, or feature requests! If you want to add a fix/feature/other improvement fork this repository and make a pull request with your changes.