Tag: TypeScript
Main Content
Convert Markdown to HTML with Node.js
Convert a Markdown file into HTML, with code block syntax highlighting, using Node.js and asynchronously write the HTML string to a file.
Convert JSON to XML with the XML npm package
Read a JSON file with Node.js and use the XML npm package with TypeScript to convert JSON to an XML string and write the XML string to a file.
Create a Service Worker with TypeScript
Use TypeScript and the Service Worker Web API to create a service worker with a network first then cache caching strategy, that can show an offline page when no connection is available.
Generate an XML Sitemap with Node.js
Use the xml npm package and TypeScript with ES Modules to generate an xml string and write it to a sitemap.xml file with Node.js.
Import and Export ES Modules in Node.js using TypeScript with Babel Compilation
Use ES Modules in Node.js without an experimental flag by configuring Babel and TypeScript to support ES Module import and export syntax.