1.0.4 • Published 5 years ago

generator-tsproject v1.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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.

:sparkles: 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
1.0.4

5 years ago

1.0.3

5 years ago