npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

typescriptmd

v0.2.9

Published

A type-safe, component-based markdown engine for TypeScript

Readme

TS Markdown

TS Markdown Extension

A type-safe, component based markdown engine for embedding markdown content with TypeScript. Create dynamic, template-driven markdown with full type support.

⚠️ Early Alpha: This library is in early alpha and is not stable for production applications.

✨ Features

  1. TypeScript Integration - Full TypeScript support with type checking and IntelliSense
  2. Template Interpolation - Dynamic content with {{ expression }} syntax
  3. Conditional Rendering - Smart conditional blocks with ternary operators and logical AND
  4. Developer Tools - Comprehensive CLI, VS Code extension, and testing utilities

🚀 Quick Start

Installation

npm install typescriptmd
# or
bun add typescriptmd

Create Your First TSMD File

mkdir tsmd
// /tsmd/Welcome.tsmd
function Welcome() {
  const appName = 'My App';
  const version = '1.0.0';
  const isProduction = false;

  return (
    # Welcome to {{ appName }}! 🎉

    Current version: **{{ version }}**

    {{ isProduction ? (
      ## Production Mode ✅
    ) : (
      ## Development Mode 🚧
    ) }}
  )
}

Basic Usage

npm run typescriptmd

Then, you will see .ts files output in /tsmd/_generated

📖 Documentation

Core Concepts

1. Template Interpolation

Use {{ expression }} to embed dynamic content:

function UserProfile() {
  const user = { name: 'Alice', age: 30, skills: ['React', 'TypeScript'] };

  return (
    # {{ user.name }}'s Profile

    **Age:** {{ user.age }}

    **Skills:** {{ user.skills.join(', ') }}

    **Bio:** {{ user.age > 25 ? 'Experienced developer' : 'Junior developer' }}
  )
}

2. Conditional Rendering

Create dynamic content with conditional blocks:

function Dashboard() {
  const { user, isLoggedIn } = useAuth();
  const notifications = getNotifications();

  return (
    # Dashboard

    {{ isLoggedIn && (
      Welcome back, {{ user.name }}!
    ) }}

    {{ !isLoggedIn && (
      Please [log in](./login) to continue.
    ) }}

    {{ notifications.length > 0 && (
      ## Notifications ({{ notifications.length }})
      {{ notifications.map(n => `- ${n.message}`).join('\n') }}
    ) }}

    {{ notifications.length === 0 && (
      No new notifications.
    ) }}
  )
}

3. Component Integration

Use components with the <@ComponentName/> syntax:

import { FeatureDetailView } from './components';

function Homepage() {
  const features = ['Fast', 'Type-safe', 'Developer-friendly'];

  return (
    # Welcome to TS Markdown

    Get started in minutes with our powerful framework.

    ## Features

    {{ features.map(feature => (
      <@FeatureDetailView feature="${feature}" />
    ) }}
  )
}

Install the TS Markdown VS Code extension for:

  • Syntax highlighting for TSMD files
  • IntelliSense for template expressions
  • Live preview of TSMD content

🤝 Contributing

We welcome contributions!

Development Setup

git clone https://github.com/andrewtdiz/tsmarkdown
cd tsmarkdown
npm install
npm run dev

Running Tests

npm test
# or with coverage
npm test --coverage

📜 License

MIT © TS Markdown Team

🔗 Links


Made with ❤️ by the TS Markdown team