This is a basic framework, a minimalist template using Typescript. It assists me in the quick start to create tests, POC or projects.
Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains. ~Steve Jobs
- Typescript 5.3+ is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.
- ESLint statically analyzes your code to quickly find problems. It is built into most text editors and you can run ESLint as part of your continuous integration pipeline.
- Prettier is an opinionated code formatter.
- Nodemon is a utility, that will monitor for any changes in your source and automatically restart your server. Perfect for development.
- ts-node is a TypeScript execution engine and REPL for Node.js.
- @types/node - This package contains type definitions for node (https://nodejs.org/).
- EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs.
- TypeDoc Automatic document generation
- npm-check-updates upgrades your package.json dependencies to the latest versions, ignoring specified versions.
- Click here to generate with this template ❓
- Edit the package.json with your desired stuff
git clone [email protected]:ricardo-melo-martins/typescript-skeleton.git
# access the folder
cd typescript-skeleton
# make it yours
rm -rf .git
Install dependencies
# Node.js >=20 is required
npm i
# or
yarn
Run the project for local development.
npm dev
# or
yarn dev
Build the project for a production environment.
npm run build
Check the latest versions of all project dependencies:
npm run check
Checking ...\typescript-skeleton\package.json
[====================] 13/13 100%
All dependencies match the latest package versions :)
Available commands for:
build
- Build one or more projects and their dependenciesbuild:watch
- Watch input filesbuild:release
- Build specified settings ontsconfig.release.json
prebuild
- Checks possibility
start
- Run static compiled on pathdist
start:dev
- Run nodemon on pathsrc
start:prod
- Run production env on pathdist
format
- Prettier format code stylelint
- ESLint code format verifylint:fix
- ESLint verify and fix
clean
- Remove cache, coverage and dist folder
doc:gen
- Automatic document generatedoc:clean
- Delete doc folder
check
- Check the latest versions of all project dependencies
- Node 20+
- Typescript Cli
- Vscode
(Optional)
This template has productivity-focused settings, snippets and extensions.
Formatting/Linting
Install dbaeumer.vscode-eslint extension in your VS Code to use eslint for formatting and linting. A configuration file (.eslintrc.js) is already provided in the project.
Typescript Skeleton is MIT licensed.
Created with fun by Ricardo Melo Martins.