- v2.6.1Latest
- v2.6.0
- v2.5.6
- v2.5.5
- v2.5.4
- v2.5.3
- v2.5.2
- v2.5.1
- v2.5.0
- v2.4.4
- v2.4.3
- v2.4.2
- v2.4.1
- v2.4.0
- v2.3.1
- v2.3.0
- v2.2.0
- v2.1.1
- v2.1.0
- v2.0.1
- v2.0.0
- v1.5.3
- v1.5.2
- v1.5.1
- v1.5.0
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.2
- 1.1.1
- 1.1.0
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.16.2
- 0.16.1
- 0.16.0
- 0.15.7
- 0.15.6
- 0.15.5
- 0.15.4
- 0.15.3
- 0.15.2
- 0.15.1
- 0.15.0
- 0.14.0
- 0.13.1
- 0.13.0
- 0.12.2
- 0.12.1
- 0.12.0
- 0.11.1
- 0.10.1
- 0.10.0
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.1
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.3
init
deno-init is a simple command line tool to initialize Deno projects from
prompts.
Please note this moduleās API is not stable yet and there may be breaking changes on
0.xversion increments.
Quickstart
deno install --allow-read --allow-run --allow-write --unstable -n deno-init https://deno.land/x/init@0.16.0/mod.ts
deno-init -y -m -n awesome_deno_projectTable of Contents
Installation
First install deno and make sure it is available on a terminal. git is also
recommended though not required.
Next, run the deno install command below to install the executable:
deno.land
deno install --allow-read --allow-run --allow-write --unstable -n deno-init https://deno.land/x/init@0.16.0/mod.tsnest.land
deno install --allow-read --allow-run --allow-write --unstable -n deno-init https://x.nest.land/init@0.16.0/mod.tsgithub
deno install --allow-read --allow-run --allow-write --unstable -n deno-init https://raw.githubusercontent.com/GJZwiers/deno-init/main/mod.tsNote you can name the program anything you like by changing the -n value.
If you already have a previous installation and would like to upgrade, run the
command with the new version number and include the -f flag.
Permissions
The program needs the following permissions to run:
read: to load files that are used to initialize projectsrun: to rungit initif the git option is truewrite: to make files in order to initialize new projectsunstable: to allow the use of unstable APIs. These mostly come from the moduleās external dependencies.
Basic Usage
deno-initThis will prompt you for the following:
- Use TypeScript? (default
y) - Set entrypoint: (default
mod.ts) - Set dependency entrypoint: (default
deps.ts) - Set dev dependency entrypoint: (default
dev_deps.ts) - Add import map? (default
n)
Choosing all defaults will create the following structure in the current directory:
.
ā .gitignore
ā deps.ts
| dev_deps.ts
ā mod.tsIf you choose to init with an import map an import_map.json file is added to
the above. If git is installed on the machine then git init is run as well.
Note that deno-init will not overwrite files or directories unless the
--force option is used explicitly. This means the program can āfill in the
blanksā in a project where not all of the files above are present yet.
Options
--help will print helpful information to the terminal.
--yes or -y will initialize the project with all the defaults, skipping the
prompts:
deno-init --yes--name or -n will initialize the project in a new directory in the current
working directory:
deno-init --name awesome_deno_project--map or -m will add an (empty) import_map.json file to the project:
deno-init --map--force or -f will allow the program to overwrite existing files. This can
be helpful to re-initialize but use with caution.
deno-init --force--no-git disables running git init as part of the project initialization.
deno-init --no-gitContributing
TBD