Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

opencv-build

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencv-build - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

17

build/install.js

@@ -70,6 +70,21 @@ "use strict";

return __awaiter(this, void 0, void 0, function () {
var autoBuildFile, hasLibs, err_1;
var rootPackageJSON, autoBuildFile, hasLibs, err_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (process.env.INIT_CWD) {
rootPackageJSON = require(path.resolve(process.env.INIT_CWD, 'package.json'));
if (rootPackageJSON.opencv4nodejs &&
rootPackageJSON.opencv4nodejs.autoBuildFlags) {
if (process.env.OPENCV4NODEJS_AUTOBUILD_FLAGS) {
process.env.OPENCV4NODEJS_AUTOBUILD_FLAGS = [
process.env.OPENCV4NODEJS_AUTOBUILD_FLAGS,
rootPackageJSON.opencv4nodejs.autoBuildFlags
].join(' ');
}
else {
process.env.OPENCV4NODEJS_AUTOBUILD_FLAGS = rootPackageJSON.opencv4nodejs.autoBuildFlags;
}
}
}
if (env_1.isAutoBuildDisabled()) {

@@ -76,0 +91,0 @@ log.info('install', 'OPENCV4NODEJS_DISABLE_AUTOBUILD is set');

2

package.json
{
"name": "opencv-build",
"version": "0.1.4",
"version": "0.1.5",
"description": "A simple script to auto build recent OpenCV + contrib version via npm",

@@ -5,0 +5,0 @@ "main": "./build/index.js",

@@ -20,1 +20,13 @@ [![Build Status](https://travis-ci.org/justadudewhohacks/npm-opencv-build.svg?branch=master)](http://travis-ci.org/justadudewhohacks/npm-opencv-build)

```
## Custom flags
It's possible to specify custom flags to build process inserting on the `package.json` where the dependency is declared an object like:
```json
{
...
"opencv4nodejs": {
"autoBuildFlags": "-DOPENCV_GENERATE_PKGCONFIG=ON -DOPENCV_PC_FILE_NAME=opencv.pc"
}
}
```
these flags will be used during building in the same way as described [here](https://github.com/justadudewhohacks/opencv4nodejs#auto-build-flags).

@@ -41,2 +41,21 @@ import * as fs from 'fs';

export async function install() {
if (process.env.INIT_CWD) {
let rootPackageJSON = require(path.resolve(process.env.INIT_CWD, 'package.json'))
if (rootPackageJSON.opencv4nodejs &&
rootPackageJSON.opencv4nodejs.autoBuildFlags) {
if (process.env.OPENCV4NODEJS_AUTOBUILD_FLAGS) {
process.env.OPENCV4NODEJS_AUTOBUILD_FLAGS = [
process.env.OPENCV4NODEJS_AUTOBUILD_FLAGS,
rootPackageJSON.opencv4nodejs.autoBuildFlags
].join(' ')
} else {
process.env.OPENCV4NODEJS_AUTOBUILD_FLAGS = rootPackageJSON.opencv4nodejs.autoBuildFlags
}
}
}
if (isAutoBuildDisabled()) {

@@ -43,0 +62,0 @@ log.info('install', 'OPENCV4NODEJS_DISABLE_AUTOBUILD is set')

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc