Deno 1.38 features HTML documentation, hot module replacement

The latest updates enhance documentation and client-side navigation in Deno and the Fresh web framework.

thumbs up multicultural
TNS Sofres (CC BY 2.0)

The Deno runtime for JavaScript, TypeScript, and WebAssembly has been updated with new HTML capabilities. The latest updates enhance documentation and client-side navigation in Deno and the Fresh web framework, respectively.

Unveiled November 2, Deno 1.38 offers “significant” improvements to the deno doc command, highlighted by an ability to produce documentation using a new deno doc --html feature. When selected, deno doc produces a static site with documentation. Deno 1.38 also features a capability for hot module replacement; an –-unstable-hmr flag detects changes and reloads the server while preserving state. The latest version of Deno also has Node.js compatibility improvements, making it easier to use Deno when migrating from Node. This release also allows developers to use the NPM package manager of their choice from Deno. Developers can install NPM modules with npm and run them with Deno. The NPM feature is currently unstable.

Developers can upgrade to Deno 1.38 using the deno upgrade command. New users can learn more by reading the installation instructions.

Also in Deno 1.38:

Deno 1.38 follows Deno 1.37, introduced in late September and featuring Jupyter notebook integration.

Fresh 1.5

The Fresh 1.5 Deno-native framework for building full-stack web applications, introduced October 10, features a new approach to client-side navigation, called Partials, which uses HTML attributes to configure Fresh applications to replace HTML in an already-loaded page using server-rendered markup with no page reload. This style of navigation makes an application feel more responsive and prevents loss of state in client-side island components across page turns. Fresh 1.5 also offers easier active link styling, by adding HTML attributes to links that could be styled differently to represent a current page or section.

Developers can start a new Fresh project be entering the command:

deno run -Ar

Fresh 1.4, released in mid-August,  brought faster page loads and shared layouts.

Copyright © 2023 IDG Communications, Inc.