Skip to content

Starter template for a new Deno project - including docs and CI 🦕 📦 ✨

License

Notifications You must be signed in to change notification settings

MichaelCurrin/deno-project-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deno Project Template 🦕 📦 ✨

Starter template for a new Deno project - including docs and CI

Deno CI GitHub tag License

Made with Deno

Sample usage

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!

Resources

Learn more about Deno:

  • Deno Dev Resources including tutorials.
  • Deno Cheatsheets.

About this template

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.

Template features

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 - run make 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.

Start coding with Deno

Use this template

Documentation

view - Documentation

License

Released under MIT by @MichaelCurrin.

About

Starter template for a new Deno project - including docs and CI 🦕 📦 ✨

Topics

Resources

License

Stars

Watchers

Forks