﻿<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="text" xml:lang="en">MfGames Writing Tools</title>
  <link type="application/atom+xml" href="https://mfgames.com/categories/mfgames-writing-tools/atom.xml" rel="self" />
  <link type="text/html" href="https://mfgames.com/categories/mfgames-writing-tools/" rel="alternate" />
  <updated>2026-04-18T17:43:18Z</updated>
  <id>https://mfgames.com/categories/mfgames-writing-tools/</id>
  <author>
    <name>D. Moonfire</name>
  </author>
  <rights>Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International</rights>
  <entry>
    <title>A Slew of (Breaking) Fixes (MfGames Writing Tools)</title>
    <link rel="alternate" href="https://mfgames.com/blog/2026/01/17/a-slew-of-breaking-fixes/" />
    <updated>2026-01-17T06:00:00Z</updated>
    <id>https://mfgames.com/blog/2026/01/17/a-slew-of-breaking-fixes/</id>
    <category term="mfgames-writing-tools" scheme="https://mfgames.com/categories/" label="MfGames Writing Tools" />
    <content type="html">&lt;p&gt;We've just pushed up a new version of &lt;a href="//mfgames.com/mfgames-writing-js/"&gt;mfgames-writing-js&lt;/a&gt;. Naturally, this started with the usual process of doing a little housekeeping, and bringing packages up to date.&lt;/p&gt;
&lt;p&gt;The main focus was to fix two bugs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://src.mfgames.com/mfgames-writing-js/mfgames-writing-js/issues/3"&gt;&lt;code&gt;.docx&lt;/code&gt; was generating hyphenation would caused problems with readers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://src.mfgames.com/mfgames-writing-js/mfgames-writing-js/issues/2"&gt;Using &amp;lsquo;&amp;mdash;&amp;rsquo; for section breaks fails to render breaks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://src.mfgames.com/mfgames-writing-js/mfgames-writing-js/issues/4"&gt;&lt;code&gt;.docx&lt;/code&gt; generation couldn't handle sub directories&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Unfortunately, we had to make a breaking change and bumped the major version of some of the packages, which also requires at least a minor update to the other changes to pick up the new version ranges.&lt;/p&gt;
&lt;p&gt;And then what followed was an embarassing set of NPM package updates as we tried to get everything working consistently and feeding into dependent projects like &lt;a href="https://src.mfgames.com/nixos-contrib/fedran-writing-setup-flake"&gt;fedran-writing-setup-flake&lt;/a&gt; which is a mass setup scrip for all the writing projects on &lt;a href="//fedran.com"&gt;fedran.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Along the way, we also introduced &lt;code&gt;--log-level&lt;/code&gt; support so &lt;code&gt;mfgames-writing-format build&lt;/code&gt; wasn't quite as noisy.&lt;/p&gt;
&lt;h2&gt;Short Version&lt;/h2&gt;
&lt;p&gt;If you use &lt;code&gt;mfgames-writing-js&lt;/code&gt;, update all your packages to the latest and things should Just Work™. If they don't, please don't hesitate to &lt;a href="https://src.mfgames.com/mfgames-writing-js/mfgames-writing-js/"&gt;report an issue&lt;/a&gt; or &lt;a href="https://d.moonfire.us/contact/"&gt;contact Dulan&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Pipeline Exclusions&lt;/h2&gt;
&lt;p&gt;Added an &lt;code&gt;exclude&lt;/code&gt; to pipelines in the same pattern as the content elements:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;contents:
  - element: chapter
    source: pipeline.md
    pipeline:
      - module: &amp;quot;@mfgames-writing/hyphen-pipeline&amp;quot;
        exclude:
          editions: [docx]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This caused a difficulty with an undocumented element in &lt;code&gt;hyphen-pipeline&lt;/code&gt; which allowed for a regular expression to ignore certain words that caused problem with hyphenation. This was moved to &lt;code&gt;exclude.regex&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;contents:
  - element: chapter
    source: pipeline.md
    pipeline:
      - module: &amp;quot;@mfgames-writing/hyphen-pipeline&amp;quot;
        exclude:
          editions: [docx]
          regex: [&amp;quot;^bob$&amp;quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Because this changed some projects in use, it was treated as a breaking change and bumped the version.&lt;/p&gt;
&lt;h3&gt;Section Breaks&lt;/h3&gt;
&lt;p&gt;When we write in Markdown, we always use &lt;code&gt;***&lt;/code&gt; for section breaks.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-markdown"&gt;---
title: Chapter One
---

Something happened.

---

After the break.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, proejcts like &lt;a href="https://mfgames.com/mfgames-writing-setup-flake/"&gt;mfgames-writing-setup-flake&lt;/a&gt; use &lt;a href="https://prettier.io/"&gt;prettier&lt;/a&gt; which always converted the &lt;code&gt;***&lt;/code&gt; into &lt;code&gt;---&lt;/code&gt; which is also a proper Markdown rule (which we use as a section break in stories).&lt;/p&gt;
&lt;p&gt;Due to interactions with &lt;a href="https://www.npmjs.com/package/smartypants"&gt;SmartyPaths&lt;/a&gt;, those &lt;code&gt;---&lt;/code&gt; were helpfully turned into an em-dash (—). We put in a little patch code that an em-dash on a line by itself is considered a rule for section breaks and turned back into &lt;code&gt;---&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Output Directory&lt;/h2&gt;
&lt;p&gt;Another thing that we've done with &lt;code&gt;mfgames-writing-setup-flake&lt;/code&gt; is put all the output files into the &lt;code&gt;build/release&lt;/code&gt; folder to keep them out of the root directory of the repository. But there was a little but where &lt;code&gt;.docx&lt;/code&gt; files couldn't handle that.&lt;/p&gt;
&lt;p&gt;We fixed it.&lt;/p&gt;
&lt;h2&gt;Logging&lt;/h2&gt;
&lt;p&gt;Also, it was a little annoying having so much data that we added a &lt;code&gt;--log-level&lt;/code&gt; to control output. It defaults to &lt;code&gt;info&lt;/code&gt; but can also be &lt;code&gt;trace&lt;/code&gt;, &lt;code&gt;debug&lt;/code&gt;, &lt;code&gt;info&lt;/code&gt;, &lt;code&gt;warn&lt;/code&gt;, and &lt;code&gt;error&lt;/code&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Moved Repository to MfGames (MfGames Writing Tools)</title>
    <link rel="alternate" href="https://mfgames.com/blog/2025/01/12/moved-repository/" />
    <updated>2025-01-12T06:00:00Z</updated>
    <id>https://mfgames.com/blog/2025/01/12/moved-repository/</id>
    <category term="mfgames-writing-tools" scheme="https://mfgames.com/categories/" label="MfGames Writing Tools" />
    <content type="html">&lt;p&gt;It's been a few years and this project has moved homes a few times. We realized in the last day that we haven't been paying attention to where this project was housed compared to when we abandoned GitLab because of their enshittification.&lt;/p&gt;
&lt;p&gt;The current home for &lt;code&gt;mfgames-writing-js&lt;/code&gt; is now on &lt;a href="https://src.mfgames.com/mfgames-writing-js/"&gt;src.mfgames.com&lt;/a&gt; and it now has a fancier &lt;a href="https://mfgames.com/mfgames-writing-js/"&gt;home page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We are going to spend a little time spurcing up the library, bringing it to a modern version of TypeScript, and infrastructure. This will be considered a break changing since the underlying libraries have jumped significantly in version.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Added `@mfgames-writing/opf` and `@mfgames-writing/ncx` (MfGames Writing Tools)</title>
    <link rel="alternate" href="https://mfgames.com/blog/2021/02/03/pulled-in-ncx-and-opf/" />
    <updated>2021-02-03T06:00:00Z</updated>
    <id>https://mfgames.com/blog/2021/02/03/pulled-in-ncx-and-opf/</id>
    <category term="mfgames-writing-tools" scheme="https://mfgames.com/categories/" label="MfGames Writing Tools" />
    <content type="html">&lt;p&gt;In the process to convert mfgames-writing into a monorepo, two packages were missed. These were &lt;code&gt;@mfgames-writing/opf&lt;/code&gt; and &lt;code&gt;@mfgames-writing/ncx&lt;/code&gt; which are used to create the OPF and NCX files inside the EPUB files. Along the way, Dylan also normalized some of the formatting, cleaned up a bit of debris still left behind, and normalized the new packages in terms of formatting and testing.&lt;/p&gt;
&lt;p&gt;Due to philosophical opinions, we moved the packages back to &lt;a href="https://gitlab.com/mfgames-writing/"&gt;Gitlab&lt;/a&gt; and off Sourcehut.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Switched to a monorepo and rehosted on SourceHut (MfGames Writing Tools)</title>
    <link rel="alternate" href="https://mfgames.com/blog/2020/07/26/monorepo-and-sourcehut/" />
    <updated>2020-07-26T05:00:00Z</updated>
    <id>https://mfgames.com/blog/2020/07/26/monorepo-and-sourcehut/</id>
    <category term="mfgames-writing-tools" scheme="https://mfgames.com/categories/" label="MfGames Writing Tools" />
    <content type="html">&lt;p&gt;Because of the difficulties of the release chain such as when &lt;code&gt;epub2&lt;/code&gt; requires changes to &lt;code&gt;format&lt;/code&gt; which requires changes to &lt;code&gt;contracts&lt;/code&gt;, Dylan has switched the entire suite of &lt;code&gt;mfgames-writing&lt;/code&gt; into a monorepo (single Git repository) using &lt;a href="https://yarnpkg.com/"&gt;Yarn&lt;/a&gt; workspaces and &lt;a href="https://lerna.js.org/"&gt;Lerna&lt;/a&gt;. Combined with Typescript's cross-project building, it appears to have developed into a fairly simple workflow for adding features.&lt;/p&gt;
&lt;p&gt;We are still using &lt;a href="https://github.com/semantic-release/semantic-release"&gt;sematic-release&lt;/a&gt; to handle releases along with &lt;a href="https://github.com/typicode/husky"&gt;Husky&lt;/a&gt; to ensure compliance on the various commits to make the release process work.&lt;/p&gt;
&lt;p&gt;Due to not reading the code very well (e.g., not looking), the OPF and NCX packages weren't migrated into the repository but will be as a future task.&lt;/p&gt;
&lt;p&gt;We also migrated the tiny number of tests from Mocha to Jest.&lt;/p&gt;
&lt;p&gt;In the process, we moved the canon home from Gitlab to &lt;a href="https://sourcehut.org/"&gt;Sourcehut&lt;/a&gt;. The reasons are varied, but Dylan found the UI of Sourcehut to be easier and it has the needed features and a compatible philosophy for the project.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://sr.ht/%7Edmoonfire/mfgames-writing/"&gt;Project Page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.sr.ht/%7Edmoonfire/mfgames-writing-js"&gt;Git&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://todo.sr.ht/%7Edmoonfire/mfgames-writing"&gt;Issues and Tickets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sr.ht/%7Edmoonfire/mfgames-writing/feed"&gt;Feed&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Overall, there are no significant changes despite the version bumps.&lt;/p&gt;
</content>
  </entry>
</feed>
