Skip to content

Commit ca3733e

Browse files
committed
feat: do not include tests in build
1 parent 714d1f9 commit ca3733e

File tree

4 files changed

+28
-31
lines changed

4 files changed

+28
-31
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,5 @@ dist
115115
.yarn/install-state.gz
116116
.pnp.*
117117

118-
build
119-
types
118+
lib
120119
.vscode

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "@admin-bro/sequelize",
33
"version": "1.3.0-beta.1",
44
"description": "Sequelize adapter for AdminBro",
5-
"main": "build/index.js",
6-
"types": "index.d.ts",
5+
"main": "lib/index.js",
6+
"types": "lib/index.d.ts",
77
"scripts": {
88
"build": "tsc",
99
"dev": "tsc --watch",

index.ts renamed to src/index.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@
7878
* @type {typeof BaseDatabase}
7979
* @static
8080
*/
81-
import type { BaseDatabase, BaseResource } from 'admin-bro';
82-
import Database from './src/database';
81+
import Database from './database';
8382

8483
/**
8584
* Implementation of {@link BaseResource} for Sequelize Adapter
@@ -88,10 +87,8 @@ import Database from './src/database';
8887
* @type {typeof BaseResource}
8988
* @static
9089
*/
91-
import Resource from './src/resource';
90+
import Resource from './resource';
9291

9392
module.exports = { Database, Resource };
9493

95-
const SequelizeAdapter = { Database, Resource };
96-
97-
export default SequelizeAdapter;
94+
export default { Database, Resource };

tsconfig.json

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
{
2-
"compilerOptions": {
3-
"outDir": "./build",
4-
"target": "es2017",
5-
"esModuleInterop": true,
6-
"jsx": "preserve",
7-
"declaration": true,
8-
"declarationDir": "./types",
9-
"strictNullChecks": true,
10-
"strictPropertyInitialization": true,
11-
"strictFunctionTypes": true,
12-
"strictBindCallApply": true,
13-
"noImplicitThis": true,
14-
"moduleResolution": "node",
15-
"module": "commonjs",
16-
"baseUrl": "./src",
17-
"skipLibCheck": true
18-
},
19-
"include": [
20-
"./src/**/*"
21-
],
22-
}
2+
"compilerOptions": {
3+
"jsx": "preserve",
4+
"strictNullChecks": true,
5+
"strictPropertyInitialization": true,
6+
"strictFunctionTypes": true,
7+
"strictBindCallApply": true,
8+
"noImplicitThis": true,
9+
"moduleResolution": "node",
10+
"baseUrl": "./src",
11+
"skipLibCheck": true,
12+
"module": "commonjs",
13+
"target": "ES2018",
14+
"sourceMap": true,
15+
"outDir": "lib",
16+
"esModuleInterop": true,
17+
"allowSyntheticDefaultImports": true,
18+
"declaration": true,
19+
"allowJs": true
20+
},
21+
"include": ["./src/**/*"],
22+
"exclude": ["**/*.spec.ts"]
23+
}

0 commit comments

Comments
 (0)