forked from thealexbaron/node-printer
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Susheer/napi-compatibility
Napi compatibility
- Loading branch information
Showing
39 changed files
with
3,328 additions
and
9,753 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ | |
*~ | ||
.settings | ||
.c9* | ||
prebuilds/ | ||
prebuilds/ | ||
# Exclude the build directory | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Win32", | ||
"includePath": [ | ||
"${workspaceFolder}/**", | ||
"${workspaceFolder}\\src\\" | ||
], | ||
"defines": [ | ||
"_DEBUG", | ||
"UNICODE", | ||
"_UNICODE" | ||
], | ||
"windowsSdkVersion": "10.0.22621.0", | ||
"compilerPath": "cl.exe", | ||
"cStandard": "c17", | ||
"cppStandard": "c++17", | ||
"intelliSenseMode": "windows-msvc-x64" | ||
} | ||
], | ||
"version": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"files.associations": { | ||
"algorithm": "cpp", | ||
"array": "cpp", | ||
"atomic": "cpp", | ||
"bit": "cpp", | ||
"cctype": "cpp", | ||
"charconv": "cpp", | ||
"clocale": "cpp", | ||
"cmath": "cpp", | ||
"compare": "cpp", | ||
"concepts": "cpp", | ||
"cstdarg": "cpp", | ||
"cstddef": "cpp", | ||
"cstdint": "cpp", | ||
"cstdio": "cpp", | ||
"cstdlib": "cpp", | ||
"cstring": "cpp", | ||
"ctime": "cpp", | ||
"cwchar": "cpp", | ||
"deque": "cpp", | ||
"exception": "cpp", | ||
"format": "cpp", | ||
"functional": "cpp", | ||
"initializer_list": "cpp", | ||
"ios": "cpp", | ||
"iosfwd": "cpp", | ||
"istream": "cpp", | ||
"iterator": "cpp", | ||
"limits": "cpp", | ||
"list": "cpp", | ||
"locale": "cpp", | ||
"map": "cpp", | ||
"memory": "cpp", | ||
"mutex": "cpp", | ||
"new": "cpp", | ||
"optional": "cpp", | ||
"ostream": "cpp", | ||
"queue": "cpp", | ||
"ranges": "cpp", | ||
"ratio": "cpp", | ||
"set": "cpp", | ||
"span": "cpp", | ||
"sstream": "cpp", | ||
"stdexcept": "cpp", | ||
"stop_token": "cpp", | ||
"streambuf": "cpp", | ||
"string": "cpp", | ||
"system_error": "cpp", | ||
"thread": "cpp", | ||
"tuple": "cpp", | ||
"type_traits": "cpp", | ||
"typeinfo": "cpp", | ||
"unordered_map": "cpp", | ||
"utility": "cpp", | ||
"vector": "cpp", | ||
"xfacet": "cpp", | ||
"xhash": "cpp", | ||
"xiosbase": "cpp", | ||
"xlocale": "cpp", | ||
"xlocbuf": "cpp", | ||
"xlocinfo": "cpp", | ||
"xlocmes": "cpp", | ||
"xlocmon": "cpp", | ||
"xlocnum": "cpp", | ||
"xloctime": "cpp", | ||
"xmemory": "cpp", | ||
"xstring": "cpp", | ||
"xtr1common": "cpp", | ||
"xtree": "cpp", | ||
"xutility": "cpp" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,80 @@ | ||
module.exports = function(grunt) { | ||
grunt.initConfig({ | ||
gyp: { | ||
ia32: { | ||
command: 'rebuild', | ||
options: { | ||
arch: 'ia32' | ||
} | ||
shell: { | ||
'node-pre-gyp-ia32': { | ||
command: 'node-pre-gyp configure build package --target_arch=ia32' | ||
}, | ||
x64: { | ||
command: 'rebuild', | ||
options: { | ||
arch: 'x64' | ||
} | ||
} | ||
}, | ||
"nw-gyp": { | ||
ia32: { | ||
command: 'rebuild', | ||
options: { | ||
arch: 'ia32' | ||
} | ||
'node-pre-gyp-x64': { | ||
command: 'node-pre-gyp configure build package --target_arch=x64' | ||
}, | ||
x64: { | ||
command: 'rebuild', | ||
options: { | ||
arch: 'x64' | ||
} | ||
'node-gyp-ia32': { | ||
command: 'node-gyp rebuild --arch=ia32' | ||
}, | ||
'node-gyp-x64': { | ||
command: 'node-gyp rebuild --arch=x64' | ||
}, | ||
'upload-binaries': { | ||
command: 'node-pre-gyp-github publish' | ||
} | ||
}, | ||
copy: { | ||
ia32: { | ||
files: [{src: 'build/Release/node_printer.node', dest: 'lib/node_printer_' + process.platform + '_ia32.node'}] | ||
files: [ | ||
{src: 'build/Release/electron_printer.node', dest: 'lib/electron_printer_' + process.platform + '_ia32.node'}, | ||
{src: 'binding.js', dest: 'lib/binding.js'}, | ||
{src: 'index.js', dest: 'lib/index.js'} | ||
] | ||
}, | ||
x64: { | ||
files: [{src: 'build/Release/node_printer.node', dest: 'lib/node_printer_' + process.platform + '_x64.node'}] | ||
files: [ | ||
{src: 'build/Release/electron_printer.node', dest: 'lib/electron_printer_' + process.platform + '_x64.node'}, | ||
{src: 'binding.js', dest: 'lib/binding.js'}, | ||
{src: 'index.js', dest: 'lib/index.js'} | ||
] | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-node-gyp'); | ||
grunt.loadNpmTasks('grunt-nw-gyp'); | ||
grunt.loadNpmTasks('grunt-shell'); | ||
grunt.loadNpmTasks('grunt-contrib-copy'); | ||
|
||
grunt.registerTask('build-nw-ia32', [ | ||
'nw-gyp:ia32', | ||
'copy:ia32' | ||
grunt.registerTask('build-pre-ia32', [ | ||
'shell:node-pre-gyp-ia32', | ||
'copy:ia32' | ||
]); | ||
|
||
grunt.registerTask('build-ia32', [ | ||
'gyp:ia32', | ||
'copy:ia32' | ||
'shell:node-gyp-ia32', | ||
'copy:ia32' | ||
]); | ||
|
||
grunt.registerTask('build-x64', [ | ||
'gyp:x64', | ||
'copy:x64' | ||
'shell:node-gyp-x64', | ||
'copy:x64' | ||
]); | ||
|
||
grunt.registerTask('build-nw-x64', [ | ||
'nw-gyp:x64', | ||
'copy:x64' | ||
grunt.registerTask('build-pre-x64', [ | ||
'shell:node-pre-gyp-x64', | ||
'copy:x64' | ||
]); | ||
|
||
grunt.registerTask('build', [ | ||
'build-ia32', | ||
'build-x64' | ||
'build-ia32', | ||
'build-x64' | ||
]); | ||
|
||
grunt.registerTask('build-pre', [ | ||
'build-pre-ia32', | ||
'build-pre-x64' | ||
]); | ||
|
||
grunt.registerTask('upload', [ | ||
'shell:upload-binaries' | ||
]); | ||
|
||
grunt.registerTask('build-nw', [ | ||
'build-nw-ia32', | ||
'build-nw-x64' | ||
grunt.registerTask('release', [ | ||
'build-pre', | ||
'upload' | ||
]); | ||
} | ||
}; |
Oops, something went wrong.