Skip to content

Commit

Permalink
chore: use tsc for building instead of Babel
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed May 23, 2020
1 parent 8ff117c commit eb4090e
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 999 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,2 +1,2 @@
node_modules/
lib/
dist/
9 changes: 0 additions & 9 deletions babel.config.js

This file was deleted.

16 changes: 6 additions & 10 deletions package.json
Expand Up @@ -5,12 +5,12 @@
"repository": "jest-community/jest-react-reporter",
"license": "MIT",
"author": "Simen Bekkhus <sbekkhus91@gmail.com>",
"main": "lib/index.js",
"main": "dist/index.js",
"files": [
"lib/"
"dist/"
],
"scripts": {
"build": "babel --extensions .js,.ts,.tsx src --out-dir lib",
"build": "tsc -p .",
"lint": "eslint . --ignore-pattern '!.eslintrc.js' --ext js,ts,tsx",
"prepare": "yarn build",
"prettylint": "prettier README.md package.json --check",
Expand Down Expand Up @@ -39,12 +39,13 @@
"trailingComma": "all"
},
"jest": {
"preset": "ts-jest",
"reporters": [
"<rootDir>/"
],
"testEnvironment": "node",
"testPathIgnorePatterns": [
"lib/"
"dist/"
]
},
"dependencies": {
Expand All @@ -58,11 +59,6 @@
"slash": "^3.0.0"
},
"devDependencies": {
"@babel/cli": "^7.7.0",
"@babel/core": "^7.7.2",
"@babel/preset-env": "^7.7.1",
"@babel/preset-react": "^7.7.0",
"@babel/preset-typescript": "^7.7.2",
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"@semantic-release/changelog": "^5.0.1",
Expand All @@ -72,7 +68,6 @@
"@types/react": "^16.9.11",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"babel-jest": "^26.0.1",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-import": "^2.18.2",
Expand All @@ -86,6 +81,7 @@
"lint-staged": "^10.2.6",
"prettier": "^2.0.5",
"semantic-release": "^17.0.7",
"ts-jest": "^26.0.0",
"typescript": "^3.7.2"
},
"peerDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions src/__tests__/index.ts
@@ -1,3 +1,5 @@
import '../';

test('placeholder', () => {
expect(1).toBe(1);
});
5 changes: 3 additions & 2 deletions tsconfig.json
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"lib": ["es2016", "dom"],
"lib": ["es2017", "dom"],
"target": "es2017",
"module": "commonjs",
"moduleResolution": "node",
"jsx": "react",
Expand All @@ -11,7 +12,7 @@
"strict": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"outDir": "lib/"
"outDir": "dist/"
},
"include": ["src/**/*"],
"exclude": ["**/__tests__/**"]
Expand Down

0 comments on commit eb4090e

Please sign in to comment.