https://github.com/marcosnicolau/node-js-typescript-setup
This is the default configuration I always end up doing in typescript node js services
https://github.com/marcosnicolau/node-js-typescript-setup
Last synced: 2 months ago
JSON representation
This is the default configuration I always end up doing in typescript node js services
- Host: GitHub
- URL: https://github.com/marcosnicolau/node-js-typescript-setup
- Owner: MarcosNicolau
- Created: 2022-03-29T21:48:42.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-28T16:22:46.000Z (over 2 years ago)
- Last Synced: 2024-10-05T12:41:06.536Z (8 months ago)
- Language: Shell
- Size: 540 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Typescript Node js setup
This is the usual configuration I always end up doing when creating services with nodejs and typescript.
You can also use it for a package.
## How to run it
1. Clone the project:
`git clone https://github.com/MarcosNicolau/node-js-typescript-setup ./`2. Give permission to the setup script:
`sudo chmod +x ./setup.sh`3. Run setup:
`yarn setup`## What it will do for you
This configuration will setup:
- eslint
- prettier
- husky, commitizen and .commitlint
- ts-config paths: added some basic paths in tsconfig.json, make sure you change it to your needs
- jest configuration
- [semantic-release](https://semantic-release.gitbook.io/semantic-release/): npm (won't publish), changelog, tag, and git
- add some basic github workflows to automate semantic releasing## About setup script
When running `yarn setup` you will be prompt to enter the basic package info and whether you would like to setup docker.
### What does the docker setup do?
1. Creates a Dockerfile
2. Creates package scripts to manage docker actions
3. Updates release workflow to include docker publish. Pushes the container to the GitHub container registry## Use it to publish a package
If you want to use this project to publish a package, change the package.json `private` field to `false`.
If you whish to automate publishing for npm, add NPM_TOKEN var to the project secrets. [click here to read docs](https://github.com/semantic-release/npm)
## A Comment about commitizen
Commitizen is a cli tool that is a must have to me because it enforces a clear and solid patterns of commits following the commonly used angular guideline.
Whenever you commit your code, run `yarn cm` and follow the tool steps.
For more information access their repo [here](https://hola.com)
## Can I contribute?
Yes of course you can, feel free to create any pr.