Electron .
uglify-js (, ).
npm i -g uglify-js
npm i @financial-freedom/electron-screenshot
/**
* main.js
*/
//
const { useCapture } = require('@jsoon/electron-screenshot');
//
const mainWindow = new BrowserWindow({
// Options
// ...
});
//
useCapture({
mainWindow
});
npm run start
# mac
npm run dist:mac
# win
npm run dist:win
⚠️ canvas Node ( Electron ), node-canvas . canvas , .
Windows node-canvas , Node, Electron , , c++ v8, , .
, node_modules/canvas/src/util.h
:
// Line 31
return c1 == c2 || std::toupper(c1) == std::toupper(c2);
:
// std:: -> ::
return c1 == c2 || ::toupper(c1) == ::toupper(c2);
, node_modules/nan/nan_typedarray_contents.h
:
// Line 36 - 40
#if (V8_MAJOR_VERSION >= 8)
data = static_cast<char*>(buffer->GetBackingStore()->Data()) + byte_offset;
#else
data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
#endif
:
//
data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;