firsttris / typescript-node-starter

:package: minimal typescript nodejs starter-kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

updates

dcsan opened this issue · comments

commented

working off this, if you ever want to update...

jest.config.js

module.exports = {
  globals: {
    'ts-jest': {
      tsConfig: 'tsconfig.json',
    },
  },
  testRegex: '(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$',
  moduleFileExtensions: [
    'js',
    'json',
    'ts',
    'tsx',
  ],
  transform: {
    '^.+\\.(ts|tsx)$': 'ts-jest'
  },
  preset: 'ts-jest',
  testMatch: null,
}

package.json

a bit nuclear option to get latest packages

{
  "name": "typescript-node-starter",
  "version": "1.0.0",
  "description": "typescript nodejs starter",
  "author": "Tristan Teufel",
  "homepage": "https://teufel-it.de",
  "repository": {
    "type": "git",
    "url": "https://github.com/firsttris/typescript-node-starter.git"
  },
  "main": "dist/index",
  "devDependencies": {
    "@types/jest": "*",
    "@types/node": "*",
    "clean-webpack-plugin": "*",
    "jest": "*",
    "nodemon": "*",
    "prettier": "*",
    "ts-jest": "*",
    "ts-loader": "*",
    "ts-node": "*",
    "ts-node-dev": "*",
    "tsconfig-paths": "*",
    "tslint": "*",
    "tslint-config-prettier": "*",
    "tslint-loader": "*",
    "tslint-plugin-prettier": "*",
    "typescript": "*",
    "webpack": "*"
  },
  "scripts": {
    "dev": "ts-node-dev --inspect --no-notify -r ./register-ts-config-path.ts ./src/index.ts",
    "nodemon": "nodemon",
    "tslint:fix": "tslint --fix -c tslint.json \"*.{ts,tsx}\"",
    "test": "jest --coverage",
    "build": "webpack",
    "update:packages": "node ./bin/wipe-dependencies.js && rm -rf node_modules && npm update --save-dev && npm update --save"
  },
  "keywords": [
    "microserver",
    "nodejs",
    "typescript",
    "jest",
    "webpack",
    "prettier"
  ],
  "license": "MIT"
}

https://khalilstemmler.com/blogs/tooling/enforcing-husky-precommit-hooks/

also nice series here ^