<>

Stamp: a microlang for project templates

by Breck Yunits

June 23, 2024 โ€” Regardless if you specialize in React, Rails, Django, Next, Java, C#, or ObjectiveC, you probably use templates to start new projects.

Templates generate a handful of files like readme.md, .gitignore, and main.

They also initialize a handful of directories like src/ and tests/.

What if it was even easier to make, edit and use these templates?

*

Introducing Stamp, a microlang (only 60 lines of code, including comments) that makes it as concise as possible to write, edit, share and expand project templates.

*

How to use

  1. Install Scroll
npm install -g scroll-cli
  1. Create myFirstStamp.scroll
stamp .gitignore *.html readme.scroll # My First Stamp <script src="scripts/hello.js"></script> scripts/ hello.js console.log("Hello world")
  1. Run scroll build

Done!

*

Stamp was jointly created by me and Guillaume Papin. Other tools (listed below) do similar things, but with some slight differences.

โ‚

Prior Art