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 🙏

© 2026 – Pkg Stats / Ryan Hefner

remark-sf

v1.0.0

Published

Remark plugin for parsing dialogue scripts with custom markdown syntax for visual novels and games.

Readme

remark-sf

📚 remark-sf (remark-script-forge) — это плагин для remark, предназначенный для парсинга диалогов, написанных в markdown с кастомной разметкой.

Используется для создания диалоговых деревьев для визуальных новелл и сюжетных игр (например, в Unity) из текстов .md ===

✨ Возможности

  • Распознаёт специальные конструкции:
    • ==ИмяПерсонажа - спикер
    • --тон злой - параметры
    • // комментарии - з аметки
    • /команда - команды
    • -[Текст выбора](узел) → развилки и выборы игрока
  • Группирует блоки по заголовкам # nodeId
  • Выдаёт MDAST-совместимое AST-дерево
  • Подходит для преобразования в JSON, а затем — в ScriptableObject в Unity

🛠️ Пример входного markdown

Давным-давно, в далекой-предалекой галактике... ==Рассказчик --тон загадочный  // ==speaker - флаг, указывающий текущего персонажа, который говорит

ЗВЕЗДНЫЕ ВОЙНЫ!!! --тон торжественный // --тон злой - параметр, указывающий каким тоном говорит персонаж (может влиять на озвучку, эффекты текста и тд)

ЭПИЗОД IV - новая надежда

/идти ==Рассказчик 0, 2

В Галактике бущует гражданская война
Корабли повстанцев, нанеся удар с тайной базы...

Погодите-погодите ==Горностай --тон удивленный

/идти ==Горностай 0, 3

У нас тут далеко не звездные и не войны! --тон злой --скорость 0.5

/квест quest1 начать

- [Давайте все выдохнем и успокоимся!](node2)
- [Правильно, так его!](node3)

📤 Пример выходного AST

{
  "type": "root",
  "children": [
    {
      "type": "paragraph",
      "children": [
        {
          "type": "text",
          "value": "Давным-давно, в далекой-предалекой галактике...",
          "position": {
            "start": { "line": 1, "column": 1, "offset": 0 },
            "end": { "line": 1, "column": 49, "offset": 48 }
          }
        },
        {
          "type": "speaker",
          "value": "==Рассказчик",
          "position": {
            "start": { "line": 1, "column": 50, "offset": 49 },
            "end": { "line": 1, "column": 63, "offset": 62 }
          }
        },
        {
          "type": "arg",
          "value": "--тон загадочный",
          "position": {
            "start": { "line": 1, "column": 64, "offset": 63 },
            "end": { "line": 1, "column": 81, "offset": 80 }
          }
        },
        {
          "type": "comment",
          "value": "// ==speaker - флаг, указывающий текущего персонажа, который говорит",
          "position": {
            "start": { "line": 1, "column": 83, "offset": 82 },
            "end": { "line": 1, "column": 148, "offset": 147 }
          }
        }
      ],
      "position": {
        "start": { "line": 1, "column": 1, "offset": 0 },
        "end": { "line": 1, "column": 148, "offset": 147 }
      }
    }
  ]
}

⚙️ Установка

npm install remark-sf

🚀 Использование

import { unified } from 'unified'
import remarkParse from 'remark-parse'
import remarkSf from 'remark-sf'

const file = await unified()
  .use(remarkParse)
  .use(remarkSf)
  .parse(markdownSource)

📁 Пример использования

Смотри директорию examples/