gitmyhub

new

JavaScript ★ 8 updated 12y ago

Scaffold a new project.

A lightweight personal scaffolding tool that generates a new project from a local template folder using a single command and Handlebars templating.

JavaScriptNode.jsHandlebarssetup: easycomplexity 1/5

This is a lightweight tool for quickly setting up new projects from templates. Instead of manually creating the same folder structure and files every time you start a project, you can run a single command—like new my-project—and it generates everything for you based on a pre-built template. It's similar to Yeoman, a popular scaffolding tool, but much simpler and built for one person's specific workflow.

The way it works is straightforward. You store your project templates in a folder on your computer (by default, a folder called _templates in your home directory). Each template is just a folder containing the files and structure you want in your new project. When you run the new command, it looks up the template you asked for and uses a tool called Handlebars to process any placeholders in those template files—letting you customize things like project names or author details—before copying everything into your new project folder.

You'd use this if you find yourself creating similar project structures over and over. For example, if you frequently start new React apps with the same folder layout, dependencies list, and configuration files, you'd create one template once and then reuse it instantly. Instead of spending ten minutes setting up boilerplate each time, you just run new react-app and you're ready to code. It's purely a personal productivity tool, not published as an npm package, so it's meant for developers who want a no-fuss way to standardize their own project setup process.

The project trades sophistication for simplicity. It doesn't have a UI, doesn't manage dependencies automatically, and isn't designed for teams or public use. It just does one thing: load a folder of template files and run them through Handlebars templating. If you need something more full-featured or shareable with your team, something like Yeoman might be a better fit.

Where it fits