Skip to content

Commit

Permalink
Merge pull request #55 from shelfio/feature/cjs-&-simplify-build
Browse files Browse the repository at this point in the history
  • Loading branch information
slavik-chapelskyi authored Aug 25, 2023
2 parents 226f4ca + 11e830a commit 21d5547
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
15 changes: 6 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"lib/"
],
"scripts": {
"build": "rm -rf lib/ && yarn build:types && babel src --out-dir lib --ignore '**/*.test.ts' --extensions '.ts'",
"build:types": "tsc --emitDeclarationOnly --declaration --isolatedModules false --declarationDir lib",
"build": "rm -rf lib/ && tsc --declaration",
"coverage": "jest --coverage",
"lint": "eslint . --ext .js,.ts,.json --fix",
"lint:ci": "eslint . --ext .js,.ts,.json",
Expand All @@ -41,22 +40,19 @@
"prettier --write"
]
},
"babel": {
"extends": "@shelf/babel-config/backend"
},
"prettier": "@shelf/prettier-config",
"jest": {
"preset": "./jest-preset.js"
"preset": "./jest-preset.js",
"transform": {
"^.+\\.tsx?$": "ts-jest"
}
},
"dependencies": {
"@shelf/elasticsearch-local": "3.2.0",
"cwd": "0.10.0"
},
"devDependencies": {
"@babel/cli": "7.22.10",
"@babel/core": "7.22.11",
"@elastic/elasticsearch": "8.4.0",
"@shelf/babel-config": "1.2.0",
"@shelf/eslint-config": "2.29.0",
"@shelf/prettier-config": "0.0.7",
"@shelf/tsconfig": "0.0.8",
Expand All @@ -68,6 +64,7 @@
"jest": "28.1.3",
"lint-staged": "13.3.0",
"prettier": "2.8.8",
"ts-jest": "28.0.8",
"typescript": "5.1.6"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {start} from '@shelf/elasticsearch-local';
const cwd = require('cwd');

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

return start(config);
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "@shelf/tsconfig/backend",
"compilerOptions": {
"strict": true
"strict": true,
"outDir": "lib"
},
"exclude": ["node_modules"],
"include": ["src"]
Expand Down

0 comments on commit 21d5547

Please sign in to comment.