﻿<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="text" xml:lang="en">asdf</title>
  <link type="application/atom+xml" href="https://d.moonfire.us/tags/asdf/atom.xml" rel="self" />
  <link type="text/html" href="https://d.moonfire.us/tags/asdf/" rel="alternate" />
  <updated>2026-03-09T17:42:47Z</updated>
  <id>https://d.moonfire.us/tags/asdf/</id>
  <author>
    <name>D. Moonfire</name>
  </author>
  <rights>Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International</rights>
  <entry>
    <title>generator-mfgames-nix-project v1.4.1 and generator-mfgames-writing 1.0.0</title>
    <link rel="alternate" href="https://d.moonfire.us/blog/2021/12/19/yeoman-generators/" />
    <updated>2021-12-19T06:00:00Z</updated>
    <id>https://d.moonfire.us/blog/2021/12/19/yeoman-generators/</id>
    <category term="programming" scheme="https://d.moonfire.us/categories/" label="Programming" />
    <category term="asdf" scheme="https://d.moonfire.us/tags/" label="asdf" />
    <category term="commitlint" scheme="https://d.moonfire.us/tags/" label="commitlint" />
    <category term="conventional-commits" scheme="https://d.moonfire.us/tags/" label="Conventional Commits" />
    <category term="direnv" scheme="https://d.moonfire.us/tags/" label="direnv" />
    <category term="editorconfig" scheme="https://d.moonfire.us/tags/" label="EditorConfig" />
    <category term="generator-mfgames-nix-project" scheme="https://d.moonfire.us/tags/" label="generator-mfgames-nix-project" />
    <category term="generator-mfgames-writing" scheme="https://d.moonfire.us/tags/" label="generator-mfgames-writing" />
    <category term="husky" scheme="https://d.moonfire.us/tags/" label="Husky" />
    <category term="mfgames-writing" scheme="https://d.moonfire.us/tags/" label="MfGames Writing" />
    <category term="nix" scheme="https://d.moonfire.us/tags/" label="Nix" />
    <category term="prettier" scheme="https://d.moonfire.us/tags/" label="Prettier" />
    <category term="semantic-release" scheme="https://d.moonfire.us/tags/" label="semantic-release" />
    <category term="typescript" scheme="https://d.moonfire.us/tags/" label="TypeScript" />
    <category term="yeoman" scheme="https://d.moonfire.us/tags/" label="Yeoman" />
    <summary type="html">A new Yeoman generator and a refresh on a second one.
</summary>
    <content type="html">&lt;p&gt;I create a lot of projects. I think between Github and Gitlab, I have a few hundred now. Much if it is because I started pushing toward strictly being one story per repository (OSPR). This means I have a lot of common patterns that not only do I have to set up but also maintain as my skills and knowledge evolve. The problem comes when I figure out a new pattern, I have to update a couple hundred repositories if I want to keep them consistent. Needless to say, this is one drawback of a monorepo but there are a lot of advantages of OSPR.&lt;/p&gt;
&lt;p&gt;A lot of my inspiration comes from Larry Wall's Three Virtues of a Great Programmer:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Laziness: The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful and document what you wrote so you don't have to answer so many questions about it.&lt;/li&gt;
&lt;li&gt;Impatience: The anger you feel when the computer is being lazy. This makes you write programs that don't just react to your needs, but actually anticipate them. Or at least pretend to.&lt;/li&gt;
&lt;li&gt;Hubris: The quality that makes you write (and maintain) programs that other people won't want to say bad things about.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This means, instead of manually doing it, I want to find a nice automated way (virtue one) that I can script and have it run across everything at once (virtue two).&lt;/p&gt;
&lt;p&gt;Previously, I had used &lt;a href="https://yeoman.io/"&gt;Yeoman&lt;/a&gt; but I was wondering if I needed to break out of that to work on a &amp;ldquo;me-specific&amp;rdquo; CLI tool. That line of thought came down because so many of the tools I'm using all package their own custom CLIs. While I do enjoy writing a good CLI, I don't want to write one if I can't.&lt;/p&gt;
&lt;p&gt;In the process of finding an alternative, I finally understood how to compose Yeoman generators together. That means I could create a generic project generator and then layer the &lt;a href="/tags/mfgames-writing/"&gt;writing&lt;/a&gt; one on top of it.&lt;/p&gt;
&lt;p&gt;At the same time, I could migrate away from &lt;a href="/tags/asdf/"&gt;asdf&lt;/a&gt; and onto my preferred infrastructure du jour, &lt;a href="/tags/nix/"&gt;Nix&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Side Note: Let me be honest, I'm constantly evolving my structures and they change as I learn new tools and my processes change with me. I won't be on Nix forever, but right now, Nix works out very nicely for what I want it to do.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This weekend I pulled something together and actually got a working version by tonight. This involves three projects:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://gitlab.com/mfgames-writing/mfgames-writing-js/"&gt;mfgames-writing&lt;/a&gt;: My publishing framework for Markdown and YAML files.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gitlab.com/mfgames-js/generator-mfgames-nix-project"&gt;generator-mfgames-nix-project&lt;/a&gt;: A Yeoman generator for creating a basic project layout.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gitlab.com/mfgames-writing/generator-mfgames-writing-js"&gt;generator-mfgames-writing&lt;/a&gt;: A Yeoman generator for setting up a writing project.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;generator-mfgames-nix-project v1.4.1&lt;/h1&gt;
&lt;p&gt;I pulled out the basic project stuff from &lt;code&gt;generator-mfgames-writing&lt;/code&gt; and made it a dedicated generator while improving it. It still asks a bunch of questions, but mainly it does the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set up &lt;a href="/tags/semantic-release/"&gt;semantic-release&lt;/a&gt; to handle non-romantic releases. &amp;ldquo;Non-romantic&amp;rdquo; meaning automated and every time I push up to &lt;code&gt;main&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Set up &lt;a href="/tags/conventional-commits/"&gt;Conventional Commits&lt;/a&gt; to drive the semantic release process. This is why my check-ins start with &lt;code&gt;feat:&lt;/code&gt;, &lt;code&gt;fix:&lt;/code&gt;, or something other tag. That way, I can just focus on a given commit being a new feature, fixing something, or breaking everything.&lt;/li&gt;
&lt;li&gt;Set up &lt;a href="/tags/commitlint/"&gt;commitlint&lt;/a&gt; to make sure the commits are properly handled for the semantic releasing.&lt;/li&gt;
&lt;li&gt;Set up &lt;a href="/tags/husky/"&gt;Husky&lt;/a&gt; to make sure commitlint is automatically handled.&lt;/li&gt;
&lt;li&gt;Configure &lt;a href="/tags/prettier/"&gt;Prettier&lt;/a&gt; to make everything pretty and normalized. This mostly helps if someone ever contributes, but I like things being consistent and neat. While I disagree with Prettier on many things, it does a fantastic job.&lt;/li&gt;
&lt;li&gt;Set up a &lt;a href="/tags/nix/"&gt;Nix flake&lt;/a&gt; to represent all the build tools needed to build the project.&lt;/li&gt;
&lt;li&gt;Set up &lt;a href="/tags/direnv/"&gt;direnv&lt;/a&gt; to automatically &amp;lsquo;enter&amp;rsquo; the environment when you go into the directory.&lt;/li&gt;
&lt;li&gt;Write out the files needed to run &lt;a href="/tags/gitlab/"&gt;Gitlab's CI/CD&lt;/a&gt; on push and generate all the files and automatically release.&lt;/li&gt;
&lt;li&gt;Set up &lt;a href="/tags/editorconfig/"&gt;EditorConfig&lt;/a&gt; for normalized formatting.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That's a lot of work and it was getting tedious as I migrated/created new projects over the last month or so as I figured out the pattern. I like it, though it is opinionated. Previously, I hated that word, but this is honestly how &lt;em&gt;I&lt;/em&gt; work and I think it's a reasonable pattern for any writing or coding project.&lt;/p&gt;
&lt;p&gt;Running it is pretty simple:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ npm install -g generator-mfgames-nix-project yo
$ mkdir name-of-project
$ cd name-of-project
$ yo mfgames-nix-project
... lots of prompting
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Overall, I like the resulting project and I'm going to be testing it fairly heavily in the new few weeks.&lt;/p&gt;
&lt;h1&gt;generator-mfgames-writing v1.0.0&lt;/h1&gt;
&lt;p&gt;Most of the intial work for &lt;code&gt;generator-mfgames-nix-project&lt;/code&gt; came from &lt;code&gt;generator-mfgames-writing&lt;/code&gt;, but I ended up also expanding that over the weekend to ask better questions about theme, author information, and the release process. It works the same as the project generator.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ npm install -g generator-mfgames-writing yo
$ mkdir name-of-project
$ cd name-of-project
$ yo mfgames-writing
... a different set of questions
$ npm run build
... lots of noise
$ ls *.epub *.pdf
name-of-project-0.0.1.epub
name-of-project-0.0.1.pdf
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This one bypasses some questions that the project one does (build, test, and release questions) and adds some other ones (theme, configuration file format, title of the work), but otherwise works the same as the other. The end result is something you should be able to build and get the output immediately.&lt;/p&gt;
&lt;p&gt;I honestly think that is really cool.&lt;/p&gt;
&lt;h1&gt;mfgames-writing&lt;/h1&gt;
&lt;p&gt;There were a bunch of versions with this, but I needed to tweak some processes because I found some bugs in these tools while writing the generators. Sadly, a &amp;ldquo;simple&amp;rdquo; fix of moving &lt;code&gt;rimraf&lt;/code&gt; from a developer dependency to a normal dependency required me to upgrade &lt;a href="/tags/typescript/"&gt;TypeScript&lt;/a&gt; to the last version and accept a wall of warnings because some of the linting tools don't like the latest version.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Using Nix</title>
    <link rel="alternate" href="https://d.moonfire.us/blog/2021/11/30/nix/" />
    <updated>2021-11-30T06:00:00Z</updated>
    <id>https://d.moonfire.us/blog/2021/11/30/nix/</id>
    <category term="programming" scheme="https://d.moonfire.us/categories/" label="Programming" />
    <category term="asdf" scheme="https://d.moonfire.us/tags/" label="asdf" />
    <category term="nix" scheme="https://d.moonfire.us/tags/" label="Nix" />
    <category term="covid" scheme="https://d.moonfire.us/tags/" label="Covid" />
    <category term="derecho-2020" scheme="https://d.moonfire.us/tags/" label="Derecho 2020" />
    <category term="merger-of-evil" scheme="https://d.moonfire.us/tags/" label="Merger of Evil" />
    <category term="minion-of-evil" scheme="https://d.moonfire.us/tags/" label="Minion of Evil" />
    <category term="second-hand-dresses" scheme="https://d.moonfire.us/tags/" label="Second-Hand Dresses" />
    <category term="flight-of-the-scions" scheme="https://d.moonfire.us/tags/" label="Flight of the Scions" />
    <category term="flood-2008" scheme="https://d.moonfire.us/tags/" label="Flood 2008" />
    <category term="kingdom-of-loathing" scheme="https://d.moonfire.us/tags/" label="Kingdom of Loathing" />
    <category term="entanglement-2021" scheme="https://d.moonfire.us/tags/" label="Entanglement 2021" />
    <summary type="html">Today, I finished putting the final touches on additional features for `generator-mfgames-writing`, my scaffolding generator for Yeoman that lets me set up writing projects quickly.
</summary>
    <content type="html">&lt;p&gt;Apparently, it's been a few months since I've blogged about anything. That isn't to say I wasn't thinking about it. I would find myself working on a little bit of code and think &amp;ldquo;this would be something interesting to talk about&amp;rdquo; or come up on a post about elitism that I want to respond. But then&amp;hellip; it didn't happen.&lt;/p&gt;
&lt;p&gt;The last four month have been probably one of the hardest I've had in a long time, even over the struggles of 2020's derecho and pandemic. It started with just a bit of stress at work, but then something got dumped on top of it. And then something on top of that, then on that, and then on that. At one point, for every time I took off my task list, two more were added.&lt;/p&gt;
&lt;p&gt;A good example is while I was fixing Partner's toilet that wasn't flushing (just a simple stalk replacement) and our youngest comes up the stairs because the downstairs toilet basically exploded (water pouring out of the bottom, ruptured wax seal, no longer flushing, soaking the carpet). I've been trying to get around to it for almost two months and &lt;em&gt;just&lt;/em&gt; removed the carpet today to find out how much drywall damage was done.&lt;/p&gt;
&lt;p&gt;There was a lot more, but going through them just turns into a story like &lt;a href="https://www.imdb.com/title/tt0310357/"&gt;Willard (2003)&lt;/a&gt; where the main character starts off in the dump, for a brief moment sees hope, and then plunges even further into the hole. Since I try to keep my blog posts positive, let's just go with that.&lt;/p&gt;
&lt;p&gt;One of those bright points was getting &lt;a href="https://weirdauthor.com/merger"&gt;Merger of Evil&lt;/a&gt; published. Shannon has always been a fantastic author and I'm glad I got to see the sequel to &lt;a href="https://weirdauthor.com/evil"&gt;Minion of Evil&lt;/a&gt; in print. Plus, the cover is fantastic (even if I didn't do it).&lt;/p&gt;
&lt;p&gt;My brother says my life is frequently a &amp;ldquo;that's good, that's bad&amp;rdquo; game. while I was able to do my part in getting &lt;em&gt;Merger of Evil&lt;/em&gt; out, I was unable to finish &lt;a href="/tags/second-hand-dresses/"&gt;Second-Hand Dresses&lt;/a&gt; or &lt;a href="/tags/flight-of-the-scions/"&gt;Flight of the Scions&lt;/a&gt; out this year, which I wanted to. The reasons are worth of a different post, but basically I had to scoop things off my pile to avoid drowning.&lt;/p&gt;
&lt;p&gt;Working on &lt;em&gt;Merger of Evil&lt;/em&gt; hit a couple of technical annoyances. A few months ago, I started using &lt;a href="/tags/asdf/"&gt;asdf&lt;/a&gt; to let me switch environments more fluidly. The project for &lt;em&gt;Merger&lt;/em&gt; seemed like a great place to use that, but somewhere in that time, there were some updates to Node and various packages that turned a minor maintenance task into something far more complicated simply because I couldn't get into the right head space.&lt;/p&gt;
&lt;p&gt;As a side note, when I was forced from my apartment in 2008 because of the flood in Cedar Rapids, I had a few months of high stress that also made things difficult to function. Much like the the last few months, minor problems became complicated when there were dozens of other things competition for my time and attention. When I got back to my apartment, I found that my old life didn't quite fit anymore. My daily ritual of going through 20-30 web comics and sites then seemed pointless so I purged my RSS feed, I stopped playing &lt;a href="https://www.kingdomofloathing.com/"&gt;Kingdom of Loathing&lt;/a&gt;, and basically had to review what &amp;ldquo;sparked joy&amp;rdquo; in my life.&lt;/p&gt;
&lt;p&gt;Those technical annoyances got me to thinking about improvements. Yeah, I had a bunch of other things demanding my attention, but &lt;em&gt;optimizing a process&lt;/em&gt; is one of the ways I reduce stress (along with &lt;em&gt;rewriting problems&lt;/em&gt;) and I desperately needed that distraction. As things were, someone on my social feed started talking about migrating from asdf to &lt;a href="https://nixos.org/"&gt;Nix&lt;/a&gt;. Nix is a lot like the old GNU &lt;a href="https://www.gnu.org/software/stow/"&gt;Stow&lt;/a&gt; but had a much better package management and, more importantly, allowed me to have seamless transitions to different versions. Nix also is more of a holistic approach since one could use &lt;a href="https://nixos.wiki/wiki/Flakes"&gt;flakes&lt;/a&gt; to wrap everything including specific Node, Python, and C# packages into a single unified whole.&lt;/p&gt;
&lt;p&gt;After a few weeks of using Nix, I can say that it definitely solves the little nits and scratches that asdf had plus handles my need for reproducible/consistent builds. I'm sure there are other problems with it, starting with the complexity of the setup files and the fact the featuers I want are still in beta, but I think I'm going to stay with it and see if it works out.&lt;/p&gt;
&lt;p&gt;Things are still in flux and life is still heaping up on my shoulders, which means there is only one thing I can do: break apart the problems as much as I can and then focus on one thing at a time.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>generator-mfgames-writing v0.3.2</title>
    <link rel="alternate" href="https://d.moonfire.us/blog/2021/07/31/generator-mfgames-writing/" />
    <updated>2021-07-31T05:00:00Z</updated>
    <id>https://d.moonfire.us/blog/2021/07/31/generator-mfgames-writing/</id>
    <category term="programming" scheme="https://d.moonfire.us/categories/" label="Programming" />
    <category term="asdf" scheme="https://d.moonfire.us/tags/" label="asdf" />
    <category term="generator-mfgames-writing" scheme="https://d.moonfire.us/tags/" label="generator-mfgames-writing" />
    <category term="commitlint-gitlab-ci" scheme="https://d.moonfire.us/tags/" label="commitlint-gitlab-ci" />
    <category term="gitlab" scheme="https://d.moonfire.us/tags/" label="Gitlab" />
    <category term="semantic-release" scheme="https://d.moonfire.us/tags/" label="semantic-release" />
    <category term="conventional-commits" scheme="https://d.moonfire.us/tags/" label="Conventional Commits" />
    <category term="commitlint" scheme="https://d.moonfire.us/tags/" label="commitlint" />
    <category term="husky" scheme="https://d.moonfire.us/tags/" label="Husky" />
    <category term="fast-trip" scheme="https://d.moonfire.us/tags/" label="Fast Trip" />
    <summary type="html">Today, I finished putting the final touches on additional features for `generator-mfgames-writing`, my scaffolding generator for Yeoman that lets me set up writing projects quickly.
</summary>
    <content type="html">&lt;p&gt;Related to process of writing from &lt;a href="/blog/2021/07/27/commitlint-gitlab-ci/"&gt;a few days ago&lt;/a&gt;, I've been working on another tool that I find myself using fairly often: &lt;a href="https://yeoman.io/"&gt;Yeoman&lt;/a&gt;. This is a scaffolding tool, which basically means it asks a few questions and then sets up a project. In my case, it does a lot of the drudge work of creating a writing project and getting it ready for &lt;a href="https://gitlab.com/"&gt;Gitlab's CI&lt;/a&gt; which I also use heavily (and why I wrote &lt;code&gt;commitlint-gitlab-ci&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Like many of the writing tools, this is based on Javascript (but not Typescript this time).&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-shell"&gt;$ sudo npm install -g yo generator-mfgames-writing
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The first thing it does is ask a number of questions about the project. I'll use &lt;a href="https://fedran.com/nor-curse-be-found/"&gt;Nor Curse Be Found&lt;/a&gt;, my Beauty and the Beast sequel, as an example.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-shell"&gt;$ mkdir nor-curse-be-found
$ cd nor-curse-be-found
$ yo mfgames-writing
? The title for your novel or story: (Nor Curse Be Found)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;All of my writing projects have a unique &amp;ldquo;slug&amp;rdquo; to describe them. This is used for the website's URL, such as &lt;a href="https://fedran.com/nor-curse-be-found"&gt;https://fedran.com/nor-curse-be-found&lt;/a&gt;, and also the name of the output (&lt;code&gt;dmoonfire-nor-curse-be-found-0.0.1.epub&lt;/code&gt;). I use a library to pull out the current directory's name and try to make a reasonable title out of it. I can change the title to something more accurate, maybe with apostrophes or possessives, but generally I keep the slug pretty even. In this case, the parenthetical item is the suggested output, so I can just hit return.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;? The title for your novel or story: Nor Curse Be Found
? The slug based on the title: (nor-curse-be-found)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Just in case the directory doesn't match the directory, I use a library to take that given title and create a slug out of it. One of the biggest things, my &lt;a href="http://www.sectorgeneral.com/shortstories/fasttrip.html"&gt;Fast Trip&lt;/a&gt; rule, is that I don't want to tell someone how to work. That is why I called this semi-opinionated in that there are a lot of options but the default is how &lt;em&gt;I&lt;/em&gt; work.&lt;/p&gt;
&lt;p&gt;There is also a question about bylines, but then we start to get into the technical bits.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;? The title for your novel or story: Nor Curse Be Found
? The slug based on the title: nor-curse-be-found
? Author's name or byline: D. Moonfire
? Do you want to create the Git repository? (Y/n)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This came from some years ago, but I do one story per repository, more so if I think the story has a possibility of being a bigger piece (which many of mine are), I want to track the versions independently, or I might be sending to an editor or submitting it somewhere (not likely these days, I self-censor a lot there). Since this is so common, I put it in as part of the questions.&lt;/p&gt;
&lt;p&gt;I have a slowly evolving set of practices when it comes to writing processes. One of the first ones is setting up a Git repository. This always starts with configuring &lt;a href="https://typicode.github.io/husky/#/"&gt;husky&lt;/a&gt;, &lt;a href="https://www.conventionalcommits.org/en/"&gt;semantic-release&lt;/a&gt;, &lt;a href="https://www.conventionalcommits.org/en/"&gt;conventional-commits&lt;/a&gt;, and &lt;a href="https://commitlint.js.org/#/"&gt;commitlint&lt;/a&gt;. (I'm working on updating my &lt;a href="https://www.npmjs.com/package/generator-mfgames-writing"&gt;Yeoman generator&lt;/a&gt; to make this a lot easier, but that will be later this week.)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;? Do you want to create the Git repository? Yes
? Any command to run after `git init`? set-moonfire-git-user
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I also write for a number of different projects (and bylines) which means I don't always use the same Gitlab login or even email. To faciliate this, I do &lt;em&gt;not&lt;/em&gt; have a global &lt;code&gt;user.name&lt;/code&gt; and &lt;code&gt;user.email&lt;/code&gt; set up in Git so it blows up if I try to make a commit without setting a local one. Since that is tedious, I write a bunch of scripts that set the user information and SSH keys (&lt;code&gt;set-moonfire-git-user&lt;/code&gt; for writing, &lt;code&gt;set-mfgames-git-user&lt;/code&gt; for programming for example) and I want to call them before I do that first commit. If I just hit return to have a blank, then nothing extra will happen.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;? Any command to run after `git init`? set-moonfire-git-user
? Do you want to create the initial commit? Yes
? Do you want to create the initial Git tag? Yes
? What version do you want to start? 0.0.1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now, the initial commit is a messy one and a philosophical difference between me and the Semantic Release folks. They have &lt;a href="https://github.com/semantic-release/semantic-release/blob/caribou/docs/support/FAQ.md#can-i-set-the-initial-release-version-of-my-package-to-001"&gt;their reasons&lt;/a&gt; to hard-code the value to &amp;ldquo;1.0.0&amp;rdquo; but I'm specifically start this process &lt;em&gt;before&lt;/em&gt; a release, so I feel it should be &amp;ldquo;0.0.1&amp;rdquo; because I want that tracking as soon as possible.&lt;/p&gt;
&lt;p&gt;Since I don't have the ability to set it via a configuration file, I get around it by creating the initial commit and then allowing it to be tagged so it can be pushed up and get the starting version I want.&lt;/p&gt;
&lt;p&gt;This is also because I tag versions I give to editors, beta readers, and even my writing group (when I went to it). The tagged version also shows up on the various Fedran pages and mainly it shows progression as I write.&lt;/p&gt;
&lt;p&gt;So, &lt;em&gt;Fast Trip&lt;/em&gt; so I jump through a few hoops. It should also be clear why I needed that command to run after &lt;code&gt;git init&lt;/code&gt; to set my user, otherwise this part would blow up with a &amp;ldquo;user not set&amp;rdquo; message.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;? What version do you want to start? 0.0.1
? Which package manager do you use? (Use arrow keys)
❯ NPM
  Yarn
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Moving away from Git and into the build process, the first question is package management. I have a love/hate relationships with &lt;code&gt;npm&lt;/code&gt;. The command works great, but I've been struggling with it (more on than off lately) so I've been using &lt;a href="https://yarnpkg.com/"&gt;yarn&lt;/a&gt; fairly heavily in the last year or so. But, with Yeoman I can give both so the user can use up or down keys to select and hit return to choose. Once they do, the menu goes away and is replaced with the choice.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;? Which package manager do you use? Yarn
? Do you want to use semantic releases? Yes
? Do you want to use conventional commits? Yes
? Do you want to use Husky? Yes
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The next three are to set up the common functionality I use with releases. They set up &lt;a href="https://semantic-release.gitbook.io/semantic-release/"&gt;semantic-release&lt;/a&gt;, &lt;a href="https://www.conventionalcommits.org/en/"&gt;conventional commits&lt;/a&gt;, &lt;a href="https://commitlint.js.org/#/"&gt;commitlint&lt;/a&gt;, and &lt;a href="https://typicode.github.io/husky/#/"&gt;Husky&lt;/a&gt; which I use to make sure all the commit messages are clean. These four program have been a stable in most of my development lately, for coding and writing, for Typescript and even C#.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;? Do you want to use Husky? Yes
? Do you want to use CI/CD? Yes
? Do you use Gitlab for your CI/CD? Yes
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I can't say enough for Gitlab's CI. Whenever I push up code to the server, it runs the entire publication process. Assuming it works, it then produces a zip archive with EPUB, MOBI, PDF, and other formats without me doing anything else. Every single time. With sematic releases and the rest, each one has a unique version so I don't have &amp;ldquo;final&amp;rdquo;, &amp;ldquo;final-2&amp;rdquo;, &amp;ldquo;final-2a&amp;rdquo;, etc. Just a clean version number that shows up everywhere, starting at 0.0.1.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;? Do you use Gitlab for your CI/CD? Yes
? Do you use asdf? No
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is another tool I use, &lt;a href="https://github.com/asdf-vm/asdf"&gt;asdf&lt;/a&gt;. This was also something that pretty much started last year, but one of the goals of &lt;a href="https://gitlab.com/mfgames-writing/mfgames-writing-js/"&gt;mfgames-writing&lt;/a&gt; was to be able to produce consistent output of novels even years later. Well, what I didn't realize is how much the Node ecosystem would change and Node 15 doesn't exactly run Node 8 packages very well due to deprecations and changing libraries.&lt;/p&gt;
&lt;p&gt;This is where &lt;code&gt;asdf&lt;/code&gt; comes in. It puts a small file (&lt;code&gt;.tool-versions&lt;/code&gt;) which says which version of Node, Yarn, C#, Python, whatever and will automatically change to those versions when I &lt;code&gt;cd&lt;/code&gt; into the directory. It basically rolls in all the functionality of &lt;code&gt;nvm&lt;/code&gt;, &lt;code&gt;virtualenv&lt;/code&gt;, and a bunch of other localized version libraries into one. Since I write and work across many languages, having one tool to manage that is easier for me. So, saying &amp;ldquo;yes&amp;rdquo; to the question copies that &lt;code&gt;.tool-versions&lt;/code&gt; into the resulting directory.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;? Do you use asdf? Yes
? Which formats do you want to use? (Press &amp;lt;space&amp;gt; to select, &amp;lt;a&amp;gt; to toggle all, &amp;lt;i&amp;gt; to invert selection)
❯◉ PDF
 ◉ EPUB
 ◯ DOCX
 ◯ HTML
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With this next question, we are out of the build section and into the formats. Basically, this just queries which types of files will be written out. The directions are pretty clear, but basically this will determine which of the format libraries are included.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;? Which formats do you want to use? PDF, EPUB, DOCX, HTML
? The name of the theme package to use: (@mfgames-writing/clean-theme)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I only have three themes right now, two are &amp;ldquo;generic&amp;rdquo; and one I prefer just for Fedran stories (but obviously don't prevent anyone from using it). Later, I hope to have more themes, but basically the choices are &lt;code&gt;@mfgames-writing/clean-theme&lt;/code&gt; and &lt;code&gt;@mfgames-writing/greekil-theme&lt;/code&gt; (a Gentium-based theme).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;? The name of the theme package to use: @mfgames-writing/clean-theme
Creating initial Git repository
Initialized empty Git repository in fedran/nor-curse-be-found/.git/
Running custom Git command


I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.


   create package.json
    force ../../../.yo-rc-global.json
    force .yo-rc.json
   create release.config.js
   create commitlint.config.js
   create .husky/commit-msg
   create .gitlab-ci.yml
   create .tool-versions
   create publication.yaml
   create yarn.lock
   create README.md
   create .gitignore
   create chapters/chapter-01.md

Changes to package.json were detected.

Running yarn install for you to install the required dependencies.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With that, it just producing a wall of tell as it creates all the files, hooks up everything, and basically gets my entire project ready, including a sample first chapter, a really basic &lt;code&gt;README.md&lt;/code&gt;, and a Git repository ready to push.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-shell"&gt;$ ls -a
.                     .git            node_modules       README.md
..                    .gitignore      package.json       release.config.js
chapters              .gitlab-ci.yml  package-lock.json  .yo-rc.json
commitlint.config.js  .husky          publication.yaml
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Right off the bat, I can build the files and see the output.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-shell"&gt;$ yarn build:pdf
... lots of output
$ ls *.pdf
nor-curse-be-found-0.0.1.pdf
$ yarn build
... huge amounts of output
$ ls nor-curse-be-found*
nor-curse-be-found-0.0.1.docx  nor-curse-be-found-0.0.1.epub
nor-curse-be-found-0.0.1.html  nor-curse-be-found-0.0.1.pdf
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I'm also ready to push up to Gitlab.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-shell"&gt;$ git remote add origin git@gitlab.com:fedran/nor-curse-be-found.git
$ git push --tags
$ git push -u origin main
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hopping over to Gitlab, I can see it building immediately.&lt;/p&gt;
&lt;p&gt;&lt;img src="./initial-push.png" height="256" style="margin-top:1em;" alt="Initial CI Run" /&gt;&lt;/p&gt;
&lt;p&gt;As soon as it is done, it uploads the output as an artifact.&lt;/p&gt;
&lt;p&gt;&lt;img src="./gitlab-log.png" height="256" style="margin-top:1em;" alt="End of Log" /&gt;&lt;/p&gt;
&lt;p&gt;I can then click on the browse (or download) button on the right.&lt;/p&gt;
&lt;p&gt;&lt;img src="./gitlab-download.png" height="256" style="margin-top:1em;" alt="Browse and Download Buttons" /&gt;&lt;/p&gt;
&lt;p&gt;Browsing lets me see a list of all the outputs that I've added.&lt;/p&gt;
&lt;p&gt;&lt;img src="./gitlab-browse.png" height="256" style="margin-top:1em;" alt="Browse Artifacts" /&gt;&lt;/p&gt;
&lt;p&gt;And I can even click on the PDF to preview it.&lt;/p&gt;
&lt;p&gt;&lt;img src="./gitlab-pdf.png" height="256" style="margin-top:1em;" alt="View PDF" /&gt;&lt;/p&gt;
</content>
  </entry>
</feed>
