├── .eslintignore ├── .eslintrc.json ├── .gitignore ├── .vscode └── settings.json ├── README.md ├── jest.config.js ├── package-lock.json ├── package.json ├── src └── point.ts ├── test └── point.spec.ts └── tsconfig.json /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "standard-with-typescript", 3 | "parserOptions": { 4 | "project": "./tsconfig.json" 5 | } 6 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "git.ignoreLimitWarning": true 3 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # typescript-base 2 | 3 | Base typescript project with all necessary dependencies. 4 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = { 3 | roots: ['/src', '/test'], 4 | collectCoverageFrom: [ 5 | '/src/**/*.ts', 6 | '!/src/main/**', 7 | '!/src/**/*-ports.ts', 8 | '!**/ports/**', 9 | '!**/test/**', 10 | '!**/config/**' 11 | ], 12 | coverageDirectory: 'coverage', 13 | testEnvironment: 'node', 14 | transform: { 15 | '.+\\.ts$': 'ts-jest' 16 | } 17 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "typescript-base", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "jest" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "jest": "^29.0.3", 13 | "ts-jest": "^29.0.1", 14 | "typescript": "^4.8.3", 15 | "@types/jest": "^29.0.3", 16 | "@types/node": "^18.7.18" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/point.ts: -------------------------------------------------------------------------------- 1 | export class Point { 2 | private x: number 3 | private y: number 4 | 5 | constructor(x: number, y: number) { 6 | this.x = x 7 | this.y = y 8 | } 9 | } -------------------------------------------------------------------------------- /test/point.spec.ts: -------------------------------------------------------------------------------- 1 | import { Point } from '../src/point' 2 | 3 | describe('Point', () => { 4 | it('should create a point at the origin', () => { 5 | const p1: Point = new Point(0, 0) 6 | }) 7 | }) -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "dist", 4 | "module": "commonjs", 5 | "target": "es2019", 6 | "esModuleInterop": true, 7 | "noEmit": false 8 | }, 9 | "include": [ 10 | "src" 11 | ], 12 | "exclude": [ 13 | "**/*.spec.ts", 14 | "**/*.test.ts" 15 | ] 16 | } --------------------------------------------------------------------------------