-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(TypeScript): setup TypeScript CLI development
BREAKING CHANGE: ship to TypeScript CLI techstack.
- Loading branch information
1 parent
5dfe27f
commit 39b2e49
Showing
16 changed files
with
12,118 additions
and
2,658 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
scripts | ||
|
||
jest.*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"env": { | ||
"es2021": true, | ||
"node": true, | ||
"jest": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 12, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"arrowParens": "always" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
NODE=development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** @type {import('@ts-jest/dist/types').InitialOptionsTsJest} */ | ||
const { compilerOptions } = require('./tsconfig.json'); | ||
const { pathsToModuleNameMapper } = require('ts-jest/utils'); | ||
const paths = pathsToModuleNameMapper(compilerOptions.paths, { | ||
prefix: '<rootDir>/', | ||
}); | ||
|
||
module.exports = { | ||
collectCoverage: true, | ||
coverageDirectory: 'coverage', | ||
coverageReporters: ['json-summary', 'lcov', 'text', 'clover'], | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
moduleNameMapper: { | ||
...paths, | ||
}, | ||
testPathIgnorePatterns: [ | ||
'node_modules', | ||
'\\.cache', | ||
'<rootDir>.*/build', | ||
'<rootDir>.*/dist', | ||
'<rootDir>.*/coverage', | ||
], | ||
setupFiles: ['<rootDir>/jest.env.setup.js'], | ||
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import path from 'path'; | ||
import dotenv from 'dotenv'; | ||
import consola from 'consola'; | ||
|
||
consola.info('DotEnv setup loaded.'); | ||
dotenv.config({ | ||
path: path.resolve(process.cwd(), '.test.env'), | ||
}); |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"include": ["./lib/**/*"], | ||
"exclude": [ | ||
"node_modules", | ||
"build", | ||
"dist", | ||
"public", | ||
"coverage", | ||
"__mocks__" | ||
], | ||
"compilerOptions": { | ||
"target": "es6", | ||
"module": "commonJS", | ||
"lib": ["dom", "esnext", "es2020"], | ||
"outDir": "./dist", | ||
"removeComments": true, | ||
"isolatedModules": true, | ||
"strict": true, | ||
"moduleResolution": "node", | ||
"baseUrl": "./", | ||
"paths": {}, | ||
"allowSyntheticDefaultImports": true, | ||
"esModuleInterop": true, | ||
"experimentalDecorators": true, | ||
"emitDecoratorMetadata": true, | ||
"skipLibCheck": true, | ||
"forceConsistentCasingInFileNames": true | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.