Starter template for a new Deno project - including docs and CI
Use this one command to install dependencies and run the Hello, World CLI app -
$ deno run index.ts --config tsconfig.json --name "friend"
Hello, friend!
Or, using make
on Linux/macOS:
$ make run
Hello, World!
Using the browser demo, if you bundle the scripts and open the test page then you'll see this logged in the browser's JS console:
Hello, Browser!
Hello, Inline script!
Learn more about Deno:
See the Template notes section of the docs for an intro to Deno and to see some usage examples.
If you know how to setup and run a Node project and you want to know the equivalents in Deno, see my Migrating from Node guide.
What is included in this project:
- A basic Deno application, following structure conventions from the docs and popular packages.
- Two app flows, so you can use either in your own project.
- CLI app - see index.ts.
- Browser app - you can compile and distribute as plain JS and load in the browser. For local development and as a demo, the sample public/index.html loads the bundle forms of the website.ts and website2.ts modules.
- Task running - covered with
make
- runmake help
for available tasks or see Makefile. - Documentation - see docs/.
- Unit testing - see lib_test.ts.
- GitHub Actions CI - see workflow in .github/ directory.
- Additional conveniences for development:
- A pre-push hook.
- An EditorConfig file.
- A placeholder TypeScript config.
- VS Code configs.
- Extensions config to prompt installing a Deno extension.
- Settings config to enable the extension - recommended per project, not globally.
Released under MIT by @MichaelCurrin.