@esslassi/electron-printer 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/binding.gyp CHANGED
@@ -1,57 +1,57 @@
1
- {
2
- "targets": [
3
- {
4
- "target_name": "electron_printer",
5
- "sources": [
6
- "src/main.cpp",
7
- "src/print.cpp",
8
- "src/printer_factory.cpp"
9
- ],
10
- "include_dirs": [
11
- "<!@(node -p \"require('node-addon-api').include\")"
12
- ],
13
- "dependencies": [
14
- "<!(node -p \"require('node-addon-api').gyp\")"
15
- ],
16
- "defines": [ "NAPI_CPP_EXCEPTIONS" ],
17
- "conditions": [
18
- ['OS=="win"', {
19
- "sources": ["src/windows_printer.cpp"],
20
- "libraries": ["winspool.lib"],
21
- "msvs_settings": {
22
- "VCCLCompilerTool": {
23
- "ExceptionHandling": 1
24
- }
25
- }
26
- }],
27
- ['OS=="mac"', {
28
- "sources": ["src/mac_printer.cpp"],
29
- "libraries": ["-lcups"],
30
- "include_dirs": [
31
- "/usr/include/cups"
32
- ],
33
- "xcode_settings": {
34
- "OTHER_CFLAGS": ["-Wall"],
35
- "GCC_ENABLE_CPP_EXCEPTIONS": "YES",
36
- "CLANG_CXX_LIBRARY": "libc++",
37
- "MACOSX_DEPLOYMENT_TARGET": "10.7"
38
- }
39
- }],
40
- ['OS=="linux"', {
41
- "sources": ["src/linux_printer.cpp"],
42
- "libraries": ["-lcups"],
43
- "include_dirs": [
44
- "/usr/include/cups"
45
- ],
46
- "cflags": [
47
- "-Wall",
48
- "-fexceptions"
49
- ],
50
- "cflags_cc": [
51
- "-fexceptions"
52
- ]
53
- }]
54
- ]
55
- }
56
- ]
57
- }
1
+ {
2
+ "targets": [
3
+ {
4
+ "target_name": "electron_printer",
5
+ "sources": [
6
+ "src/main.cpp",
7
+ "src/print.cpp",
8
+ "src/printer_factory.cpp"
9
+ ],
10
+ "include_dirs": [
11
+ "<!@(node -p \"require('node-addon-api').include\")"
12
+ ],
13
+ "dependencies": [
14
+ "<!(node -p \"require('node-addon-api').gyp\")"
15
+ ],
16
+ "defines": [ "NAPI_CPP_EXCEPTIONS" ],
17
+ "conditions": [
18
+ ['OS=="win"', {
19
+ "sources": ["src/windows_printer.cpp"],
20
+ "libraries": ["winspool.lib"],
21
+ "msvs_settings": {
22
+ "VCCLCompilerTool": {
23
+ "ExceptionHandling": 1
24
+ }
25
+ }
26
+ }],
27
+ ['OS=="mac"', {
28
+ "sources": ["src/mac_printer.cpp"],
29
+ "libraries": ["-lcups"],
30
+ "include_dirs": [
31
+ "/usr/include/cups"
32
+ ],
33
+ "xcode_settings": {
34
+ "OTHER_CFLAGS": ["-Wall"],
35
+ "GCC_ENABLE_CPP_EXCEPTIONS": "YES",
36
+ "CLANG_CXX_LIBRARY": "libc++",
37
+ "MACOSX_DEPLOYMENT_TARGET": "10.7"
38
+ }
39
+ }],
40
+ ['OS=="linux"', {
41
+ "sources": ["src/linux_printer.cpp"],
42
+ "libraries": ["-lcups"],
43
+ "include_dirs": [
44
+ "/usr/include/cups"
45
+ ],
46
+ "cflags": [
47
+ "-Wall",
48
+ "-fexceptions"
49
+ ],
50
+ "cflags_cc": [
51
+ "-fexceptions"
52
+ ]
53
+ }]
54
+ ]
55
+ }
56
+ ]
57
+ }
@@ -19,8 +19,8 @@ exports.printFileAsync = printFileAsync;
19
19
  exports.getJobAsync = getJobAsync;
20
20
  exports.getPrintersAsync = getPrintersAsync;
21
21
  exports.getPrinterAsync = getPrinterAsync;
22
- const bindings_1 = __importDefault(require("bindings"));
23
- const native = (0, bindings_1.default)('electron_printer');
22
+ const path_1 = __importDefault(require("path"));
23
+ const native = require(path_1.default.join(__dirname, '../build/Release/electron_printer.node'));
24
24
  /* ===========================
25
25
  DIRECT NATIVE EXPORTS
26
26
  =========================== */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@esslassi/electron-printer",
3
3
  "description": "Node.js and Electron bindings",
4
- "version": "0.0.7",
4
+ "version": "0.0.8",
5
5
  "main": "./lib/index.js",
6
6
  "private": false,
7
7
  "scripts": {