Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Copypaster – simple JSON based code generator (github.com/mbrizic)
1 point by mbrizic 13 days ago | hide | past | favorite | 1 comment

Over the course of my 6 years in software so far, I have written at least that many versions of similar code generators in whichever language we had in the project at the time.

But it's only this time that I decided to build something that's not baked into the system, but rather an external tool that you configure per project how it should be used.

So instead of keeping a "template project" committed in a repo that your generator uses, with this approach you "describe" the templates in a config file, which generator picks up and creates new files based on them, performing all necessary string replacements.

That way it's lot simpler to create and maintain your templates. But honestly, I created the tool as configurable as it is primarily as I want it to be _the last_ generator that I have to write.

And in light of recent NPM drama, the tool has zero dependencies in runtime (although some are used during development, like Typescript or Jest).

I'd appreaciate the feedback about this. Thanks!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact