TrainingITCourses / ultebra-jest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

quark

Fundamental TypeScript project template

Clone, fork or use as a template repository for creating your next TypeScript project.

git clone https://github.com/AtomicBuilders/quark/ your-project
cd your-project
npm install

🎯 Motivation

Avoid start from an empty repository.

Have a template to create TypeScript repositories with a project already configurated.

A boilerplate ready to apply clean code techniques and testing.

βš™ Workflows

πŸ‘¨β€πŸ’» Dev Workflow

While developing, make sure to install the recommended extensions for a better dev experience.

Testing

Run npm run test:watch it will run test after each change. Ideal for TDD or testing just in time.

Running

To run your code without having to build it just execute npm run dev

Updating

To keep your dependencies up to date use npm run updates and it will check for updates. Then cherry pick what you want to update.

🚚 Deploy Workflow

Testing

Run npm run test it will run all test once and stops. Default for CI/CD most common environments.

If you want also the coverage report then use npm run test:coverage .

Release

If you want to tag your work as to keep track of your releases, then there is a script for you: npm run release. It will:

  • update the versiΓ³n number
  • update the change log file.
  • push and tag changes

Build and run

The standard npm start will run de build process before, so you can deploy the source code alone.

This way you can automate the deployment with the former release script.

πŸ€– Scripts

Here you have a recap of the available scripts

  "scripts": {
    "start": "ts-node ./src/main.ts",
    "build": "tsc -p tsconfig.json",
    "dev": "ts-node ./src/main.ts",
    "test": "jest",
    "test:watch": "jest --watch --verbose",
    "test:coverage": "jest --coverage",
    "ts-node": "ts-node",
    "format": "prettier --write \"./**/*.{ts,json}\"",
    "lint": "eslint src --ext .ts",
    "lint:fix": "npm run lint -- --fix",
    "prerelease": "standard-version ",
    "release": "git push --follow-tags origin master",
    "updates": "ncu -u"
  }

πŸ›  Tools

πŸ“‹ GitHub Issues

Use GitHub issues for tracking User Stories and developer tasks.

  • Each issue may be labeled with
    • categories: feature, bug, test, refactor, dependencies, chore
    • priorities: must, should, could, wont MoSCoW priority
    • milestones: may be epics or releases
    • project: a Kanban automated dashboard to track issue workflow

More info in Spanish at GitHub Projects and Tools

πŸ“¦ Commits and release

πŸ’… Code style with Prettier

  • Installed and configured prettier

Recommended prettier extension

πŸ“ Code linting with esLint

  • Installed and configured eslint to work with prettier

Recommended esLint extension

πŸ§ͺ Code tested with Jest

  • Installed and configured jest to run specs
  • Configured to conform with eslint
  • Uses ts-jest to work natively with TypeScript

Use this snippets .vscode\ts-snippets.json as an inspiration to create yours

🧩 VS Code Extensions

Recommendations

πŸ‘½ Extra

πŸ”§ Settings and Snippets

See User and WorkSpace configurations at .vscode folder as an inspiration for yours See also .vscode\ts-snippets.json to use in your TypeScript snippets for easy testing

⌨ VS Code Shortcuts

TOP 10

  • F1 :command list
  • CTRL+P : file
  • CTRL+T : search code
  • CTRL+K CTRL+Z : code comment
  • CTRL+K CTRL+U : uncomment code
  • F12 : go to definition
  • CTRL+Γ‘ : show hide terminal
  • CTRL+B: show hide navigation bar
  • CTRL+K S : save al files
  • ALT+up|dawn : move line

πŸ‘¨ Created by Alberto Basalo

@albertobasalo

Remember There is a branch with the JavaScript version of this project

About

License:MIT License


Languages

Language:TypeScript 70.6%Language:JavaScript 29.4%