Skip to content

Commit

Permalink
patch exports
Browse files Browse the repository at this point in the history
  • Loading branch information
UrielCh committed Apr 20, 2024
1 parent b1f6ef9 commit e0fb5ca
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ cjs/install/
cjs/lib/
esm/install/
esm/lib/
types/
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@u4/opencv4nodejs",
"version": "7.0.0-alpha-2",
"version": "7.0.0-alpha-4",
"description": "Asynchronous OpenCV 3.x / 4.x nodejs bindings with JavaScript and TypeScript API.",
"keywords": [
"opencv",
Expand Down Expand Up @@ -60,7 +60,8 @@
"lint": "eslint examples/**/*.ts src/**/*.ts typings/**/*.ts ",
"clean": "node-gyp clean",
"cleanjs": "rimraf {examples}/**/*.{d.ts,js,map} {cjs,esm}/{lib,install}",
"build-debug": "npm run build && BINDINGS_DEBUG=true node bin/install.js rebuild"
"build-debug": "npm run build && BINDINGS_DEBUG=true node bin/install.js rebuild",
"publish-next": "npm publish --dry-run --tag next"
},
"dependencies": {
"@u4/opencv-build": "^0.9.1",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/opencv4nodejs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import promisify from './promisify';
import extendWithJsSources from './src/index';
import { getOpenCV } from './cvloader';
import type * as openCV from '../../typings/index';
export type * as openCV from '../../typings/index';

declare type OpenCVType = typeof openCV;

function loadOpenCV(opt?: OpenCVBuildEnvParams): OpenCVType {
Expand Down Expand Up @@ -31,7 +33,5 @@ for (const key in cv) {
}
defExport['cv'] = cv;

// export cv;
export default defExport;

//export = defExport;
11 changes: 11 additions & 0 deletions tsconfig-common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"target": "ES2019",
"strict": false,
"esModuleInterop": true,
"noImplicitReturns": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
},
"include": [ "src/**/*.ts"]
}
6 changes: 3 additions & 3 deletions tsconfig-esm.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"extends": "./tsconfig.json",
"extends": "./tsconfig-common.json",
"compilerOptions": {
"module": "ESNext",
"module": "Node16",
"declaration": false,
"declarationMap": false,
"outDir": "esm",
"moduleResolution": "Node",
"moduleResolution": "Node16",
},
}

11 changes: 3 additions & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
{
"extends": "./tsconfig-common.json",
"compilerOptions": {
"target": "ES2019",
"strict": false,
"esModuleInterop": true,
"noImplicitReturns": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"module": "commonjs",
"declaration": true,
"declarationMap": true,
"declarationDir": "types",
"outDir": "cjs",
"module": "commonjs",
},
"include": [ "src/**/*.ts"]
}

0 comments on commit e0fb5ca

Please sign in to comment.