diff --git a/.gitignore b/.gitignore index ae4fc8f72..bb75ba846 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,5 @@ examples/src/YOLOv3-Training-Snowman-Detector/train.log examples/src/YOLOv3-Training-Snowman-Detector/darknet53.conv.74 examples/src/YOLOv3-Training-Snowman-Detector/weights docs/ +lib/*.d.ts.map +install/*.d.ts.map diff --git a/CHANGELOG.md b/CHANGELOG.md index eb6b048a4..223554783 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # changelog +## Version 6.4.5 +- drop .ts files from npm package. +- add .d.ts file for ts files in npm package. +- add .d.ts.map file for ts files in npm package. +- fix [issue 81](https://github.com/UrielCh/opencv4nodejs/issues/81) + ## Version 6.4.4 - remove typescript requirement at setup [PR-78](https://github.com/UrielCh/opencv4nodejs/pull/78) - [PR-80](https://github.com/UrielCh/opencv4nodejs/pull/80) diff --git a/package.json b/package.json index fcbb58ec0..d87583bcc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@u4/opencv4nodejs", - "version": "6.4.4", + "version": "6.4.5", "description": "Asynchronous OpenCV 3.x / 4.x nodejs bindings with JavaScript and TypeScript API.", "keywords": [ "opencv", @@ -37,13 +37,13 @@ "scripts": { "build": "tsc --pretty --project .", "prepack": "npm run build", - "install": "npm run build && node bin/install.js auto", - "install_Mac": "npm run build && CXXFLAGS=\"-std=c++14 -Wno-c++11-narrowing\" node ./install/install.js --version 4.5.3 build", - "install_default": "npm run build && node bin/install.js rebuild", + "install": "node bin/install.js auto", + "install_Mac": "CXXFLAGS=\"-std=c++14 -Wno-c++11-narrowing\" node ./install/install.js --version 4.5.3 build", + "install_default": "node bin/install.js rebuild", "install_ubuntu": "echo call: sudo apt install libopencv-dev; build-opencv --incDir /usr/include/opencv4/ --libDir /lib/x86_64-linux-gnu/ --binDir=/usr/bin/ --nobuild rebuild", - "install_macm1": "npm run build && node bin/install.js --version 4.5.4 --flag=\"-DCMAKE_SYSTEM_PROCESSOR=arm64 -DCMAKE_OSX_ARCHITECTURES=arm64 -DWITH_FFMPEG=ON\" rebuild", - "install_cuda": "npm run build && cross-env OPENCV4NODEJS_DISABLE_AUTOBUILD= node bin/install.js --version 4.6.0 --flags=\"-DWITH_CUDA=ON -DWITH_CUDNN=ON -DOPENCV_DNN_CUDA=ON -DCUDA_FAST_MATH=ON -DWITH_FFMPEG=ON\" rebuild", - "install_4_6_0_cuda_30XX": "npm run build && cross-env OPENCV4NODEJS_DISABLE_AUTOBUILD= node bin/install.js --keepsource --version 4.6.0 --cuda --cudaArch=8.6 rebuild", + "install_macm1": "node bin/install.js --version 4.5.4 --flag=\"-DCMAKE_SYSTEM_PROCESSOR=arm64 -DCMAKE_OSX_ARCHITECTURES=arm64 -DWITH_FFMPEG=ON\" rebuild", + "install_cuda": "cross-env OPENCV4NODEJS_DISABLE_AUTOBUILD= node bin/install.js --version 4.6.0 --flags=\"-DWITH_CUDA=ON -DWITH_CUDNN=ON -DOPENCV_DNN_CUDA=ON -DCUDA_FAST_MATH=ON -DWITH_FFMPEG=ON\" rebuild", + "install_4_6_0_cuda_30XX": "cross-env OPENCV4NODEJS_DISABLE_AUTOBUILD= node bin/install.js --keepsource --version 4.6.0 --cuda --cudaArch=8.6 rebuild", "test": "cd test && pnpm install && pnpm run test", "samples": "cd examples && pnpm install && npm run build && node ./src/templateMatch/multiMatchBench.js && node ./src/templateMatch/multiMatchColision.js && node ./src/applyColorMap.js && node ./src/asyncMatchFeatures.js && node ./src/faceDetect/asyncFaceDetection.js", "do-build": "npm run build && node bin/install.js --version 4.6.0 --jobs MAX build", @@ -83,9 +83,14 @@ }, "files": [ "cc", - "install", - "lib", - "bin", + "install/*.js", + "install/*.d.ts", + "install/*.map", + "lib/**/*.xml", + "lib/**/*.js", + "lib/**/*.d.ts", + "lib/**/*.map", + "bin/*.js", "typings", "binding.gyp", "tsconfig.json" diff --git a/tsconfig.json b/tsconfig.json index a00547d6f..682817b24 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,9 @@ "esModuleInterop": false, "noImplicitReturns": true, "skipLibCheck": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "declaration": true, + "declarationMap": true, }, //"files": [ "./install/install.ts", "./install/parseEnv.ts" ] "include": [ "./install/*.ts", "./lib/**/*.ts" ]