Create template on npmjs

830 views Asked by At

I would like to create my first npmjs boiler project.

So if I were to run: npm install my-boilerplate dir it should create a new project in the dir folder with my structure.

But after a lot of research I couldn't find any description for it and i was able only able to create an npm module (not a project boilerplate/template).

Can anyone share the steps for the solution?

1

There are 1 answers

0
msanford On

You sound like you're looking for something like a yeoman generator.

Generators, generically, will do what you want: create project boilerplate without themselves being the project.

Another alternative is to make it a github project and npm install from git, (as per How to install an npm package from GitHub directly?). The advantage of this over simply cloning the git project is that npm will not create a /.git repo from the project.