Skip to content

obrassard/generator-tsproject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TypeScript Logo

generator-tsproject

A light, yet convenient, Yeoman generator for TypeScript + Node.JS projects

This generator will allows you to customize and scaffold your next TypeScript project in seconds.

Besides providing the basic files and packages needed for TypeScript + Node.js development, the generator will helps you to install and setup other usefull development tools such as Nodemon, or Jest.

✨ NEW: You can now scaffold and customize a complete Express.JS project using yo tsproject:express

No more manual configuration required. 🀯

Psst ! It can also generate development Docker files and workflow files for Github Actions.


See this package on NPM

Getting started

npm install -g yo
npm install -g generator-tsproject
yo tsproject <project-name>

# Or for express projects :
yo tsproject:express <project-name>

Generated project's structure (tsproject)

When all options are enabled, this is what a generated project looks like :

.
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ jest.config.js
β”œβ”€β”€ node_modules/
β”‚   └── ...
β”œβ”€β”€ nodemon.json
β”œβ”€β”€ package.json
β”œβ”€β”€ readme.md
β”œβ”€β”€ src
β”‚   └── main.ts
β”œβ”€β”€ tests
β”‚   └── main.test.ts
β”œβ”€β”€ tsconfig.json
└── yarn.lock

Generated project's structure (tsproject:express)

With the express subgenerator, and all options enabled, this is what a generated project looks like :

.
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ jest.config.js
β”œβ”€β”€ nodemon.json
β”œβ”€β”€ node_modules/
β”‚   └── ...
β”œβ”€β”€ package.json
β”œβ”€β”€ readme.md
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ errors
β”‚   β”‚   └── http.error.ts
β”‚   β”œβ”€β”€ index.ts
β”‚   β”œβ”€β”€ middlewares
β”‚   β”‚   └── demo.middleware.ts
β”‚   β”œβ”€β”€ routes
β”‚   β”‚   β”œβ”€β”€ api.router.ts
β”‚   β”‚   β”œβ”€β”€ base.router.ts
β”‚   β”‚   └── main.router.ts
β”‚   β”œβ”€β”€ server.ts
β”‚   β”œβ”€β”€ static
β”‚   └── views
β”‚       β”œβ”€β”€ home.handlebars
β”‚       └── layouts
β”‚           └── main.handlebars
β”œβ”€β”€ tests
β”‚   └── express.test.ts
β”œβ”€β”€ tsconfig.json
└── yarn.lock