0.0.12 • Published 2 months ago

create-typescript-project-scaffolding v0.0.12

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

Summary: This package can create a new project file and folder structure with dependencies, example files and config files which you have selected to your needs!

On the left is an example output if you run the script and on the right is the created folder structure.

Usage

You can create the following project templates:

  • http-api server with express
  • websocket server with plain websocket
  • socket.io server
  • a generic npm package for publish etc.
  • an empty project with no presets, just the developer dependencies

Every Project can have

  • eslint, prettier, convict, winston, joi, amqp, mqtt configured
  • as well as different test frameworks like jest, mocha, cypress, vitest with code coverage via nyc
  • different database dependencies can be selected: mongoose, typeorm, mysql / mysql2, mongodb, redis
  • Dockerfile configuration can be created
  • CI/CD templates for github actions and gitlab ci can be created

Run:

npm init typescript-project-scaffolding@latest

If there is a question:

Need to install the following packages:
  create-typescript-project-scaffolding
Ok to proceed? (y) 

=> Enter "y" to install the init-project

The Following options can be customized:

QuestionAvailable OptionsDefault ValueDescription
1. Project-Name"." or any path-stringThe Folder Name where to create the new project, use "." for the current directory (if some files already exist in the folder, you need to press Enter a few times to force use the given folder - Instructions are shown in the console)
2. Project-Type['http-api@express-utils', 'websocket-server', 'socket-io-server', 'npm-package', 'empty-project']The Template for creating the new project, depending in this answer, custom project source files will be created
3. Dockerfiletrue or falsetrueAdd a Dockerfile to run the project as a docker container (not available if project type is npm-package)
4. CI/CD Pipeline['gitlab', 'github', 'none']githubA CI/CD Pipeline template (GitHub Actions or Gitlab Pipelines) which automatically is configured for the build and deployment of the project-type (push to NPM Registry or Docker Registry)
5. Additional Packages['eslint', 'prettier', 'convict', 'ts-node-dev', 'winston', 'joi', 'amqp', 'mqtt']['eslint', 'prettier', 'ts-node-dev', 'winston']Some dependencies which can be useful for the developer experience or for project functions (Multi-Select possible); Dependencies will be added as dependencies to package.json and if applicable, config files will be added
6. Testing Packages['mocha', 'chai-http', 'nyc', 'cypress', 'jest', 'vitest']Select (multiple) dependencies used for unit/integration/end-to-end testing; Custom test npm run scripts will be added as well as example test files
7. Database Driver['mongoose', 'typeorm', 'mysql', 'mysql2', 'mongodb', 'redis']Select a Database dependency for a DB connection (multiple answers can be possible)
8. latest package versionstrue or falsefalseIf true, the latest npm package version will be installed, otherwise an hard-coded version will be used; If true, it is not guaranteed that the example files will be working, because it is only tested with the hard-coded versions
9. npm installtrue or falsefalseIf true, the dependencies selected will be installed with npm install; If not, the installation step will be skipped.
10. git inittrue or falsefalseCreate a git repository in the new project folder
11. .idea/ folder files['prettier', 'eslint']Copy .idea files to the destination to auto-configure IDE settings

Reference

Todo

  • (prio: high) readme (pictures, videos)
  • (prio: high) ci/cd templates
  • (prio: none) testing jest/vitest etc. framework
  • (prio: none) add more project templates?? -->

🤝 Contributing

Contributions, issues and feature requests are welcome! Feel free to create issues here on GitHub.


Give a ⭐️ if this project helped you!

2022-2023 Trickfilm400

0.0.12

2 months ago

0.0.10

9 months ago

0.0.9

11 months ago

0.0.8

12 months ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago