Skip to content

Commit 21d5547

Browse files
Merge pull request #55 from shelfio/feature/cjs-&-simplify-build
2 parents 226f4ca + 11e830a commit 21d5547

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

package.json

+6-9
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
"lib/"
2424
],
2525
"scripts": {
26-
"build": "rm -rf lib/ && yarn build:types && babel src --out-dir lib --ignore '**/*.test.ts' --extensions '.ts'",
27-
"build:types": "tsc --emitDeclarationOnly --declaration --isolatedModules false --declarationDir lib",
26+
"build": "rm -rf lib/ && tsc --declaration",
2827
"coverage": "jest --coverage",
2928
"lint": "eslint . --ext .js,.ts,.json --fix",
3029
"lint:ci": "eslint . --ext .js,.ts,.json",
@@ -41,22 +40,19 @@
4140
"prettier --write"
4241
]
4342
},
44-
"babel": {
45-
"extends": "@shelf/babel-config/backend"
46-
},
4743
"prettier": "@shelf/prettier-config",
4844
"jest": {
49-
"preset": "./jest-preset.js"
45+
"preset": "./jest-preset.js",
46+
"transform": {
47+
"^.+\\.tsx?$": "ts-jest"
48+
}
5049
},
5150
"dependencies": {
5251
"@shelf/elasticsearch-local": "3.2.0",
5352
"cwd": "0.10.0"
5453
},
5554
"devDependencies": {
56-
"@babel/cli": "7.22.10",
57-
"@babel/core": "7.22.11",
5855
"@elastic/elasticsearch": "8.4.0",
59-
"@shelf/babel-config": "1.2.0",
6056
"@shelf/eslint-config": "2.29.0",
6157
"@shelf/prettier-config": "0.0.7",
6258
"@shelf/tsconfig": "0.0.8",
@@ -68,6 +64,7 @@
6864
"jest": "28.1.3",
6965
"lint-staged": "13.3.0",
7066
"prettier": "2.8.8",
67+
"ts-jest": "28.0.8",
7168
"typescript": "5.1.6"
7269
},
7370
"engines": {

src/setup.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {start} from '@shelf/elasticsearch-local';
44
const cwd = require('cwd');
55

66
module.exports = function startES() {
7-
const path = process.env.JEST_ELASTICSEARCH_CONFIG || resolve(cwd(), 'jest-es-config.js');
7+
const path = process.env.JEST_ELASTICSEARCH_CONFIG || resolve(cwd(), 'jest-es-config');
88
const config = require(path)();
99

1010
return start(config);

tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"extends": "@shelf/tsconfig/backend",
33
"compilerOptions": {
4-
"strict": true
4+
"strict": true,
5+
"outDir": "lib"
56
},
67
"exclude": ["node_modules"],
78
"include": ["src"]

0 commit comments

Comments
 (0)