Skip to content

aibyte/refactor2pattern-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Refactor to pattern - TypeScript version

A sample project to demonstrate the refactoring of a set of codebase to pattern.

Cases

steps to create project

  • Init project config (package.json)
npm init -y
# using -y flag tells npm init to automatically use the defaults.
  • Install TypeScript and ts-node
npm i -D typescript ts-node
# This will add the package under devDependencies
  • Create a tsconfig.json file
# Will create the tsconfig.json file with default options
npx tsc --init
  • Configuring Testing Environment
npm i -D jest ts-jest @types/jest
  • Configure Jest: jest.config.js
     module.exports = {
       preset: "ts-jest",
       testEnvironment: "node",
     };
  • Add TypeScript Configuration: Add include and exclude properties after compilerOptions
    {
    "compilerOptions": {
    // ...
    },
    "include": ["**/*.ts"],
    "exclude": ["node_modules"]
    }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors