Thaum

Full disclosure, this is a post about a project a buddy of mine started. Be aware that I'm gonna be biased toward it. :)

Having said all that, Thaum is a really freakin' sweet scaffolding tool.

I've looked at yeoman but I found the process of creating my own project generators needlessly complicated.

Thaum doesn't require you to write any code, just mustache templates. This is a huge improvement in my book.

To start with, I just ran the following in my terminal:

wget "https://github.com/Flaque/thaum/releases/download/v0.4.0-beta/thaum" -O "/usr/local/bin/thaum" && sudo chmod +x /usr/local/bin/thaum  

Then I made a thaum_files directory (when I run thaum from the command line, it'll just look for the nearest directory with that name), and created a web_app directory inside that. web_app will be the template I use when I run thaum.

Then I copied the react project I used for my react-redux post and made a few changes.

First, I made the project create a kind of hello-world component. It's a text field that you can type into, which causes a paragraph element to show what you've typed:

Next I removed stuff I didn't want in the template, like node_modules.

Then I put made a directory called {{name}} (yes, you can use mustache templates for directory names, how cool is that?) and replaced the text in files like package.json, index.pug, to use {{name}} or {{description}} as appropriate.

Then I went to a directory I wanted to create my next project in and did the following:

Stevens-Air:Dev stevensmith$ thaum web_app  
🔍  Using thaum_files at: "/Users/stevensmith/Dev/thaum_files"

        name: GeneratorsAndPromises
 description: A repo associated with the post at http://funkyjavascript.com/generators-and-promises/

And it made my next project!

From now on, this is my go-to project generator. All I need to do now is make a script that takes name and description, creates the project, then the repo, and I'm good.

Looking for a software developer?