Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@
'dependencies': [
'deps/libexpat/libexpat.gyp:expat'
]
},
{
'target_name': 'action_after_build',
'type': 'none',
'dependencies': [ '<(module_name)' ],
'copies': [
{
'files': [ '<(PRODUCT_DIR)/<(module_name).node' ],
'destination': '<(module_path)'
}
]
}
]
}
7 changes: 5 additions & 2 deletions lib/node-expat.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
var EventEmitter = require('events').EventEmitter
var util = require('util')
// Only support nodejs v0.6 and on so no need to look for older module location
var expat = require('bindings')('node_expat')
var binary = require('node-pre-gyp')
var path = require('path')
var binding_path = binary.find(path.resolve(path.join(__dirname,'../package.json')))
var expat = require(binding_path)
var Stream = require('stream').Stream

var Parser = function(encoding) {
Expand Down Expand Up @@ -109,4 +112,4 @@ exports.createParser = function(cb) {
parser.on('startElement', cb)
}
return parser
}
}
19 changes: 14 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "node-expat",
"version": "2.3.7",
"main": "./lib/node-expat",
"version": "2.3.8",
"main": "./lib/node-expat.js",
"description": "NodeJS binding for fast XML parsing.",
"keywords": [
"xml",
Expand All @@ -12,16 +12,25 @@
"parsing"
],
"scripts": {
"test": "vows --spec ./test/**/*.js"
"test": "vows --spec ./test/**/*.js",
"install": "node-pre-gyp install --fallback-to-build"
},
"dependencies": {
"bindings": "~1.2.1",
"debug": "~2.1.0",
"iconv": "~2.1.5",
"nan": "~1.7.0"
"nan": "~1.7.0",
"node-pre-gyp": "0.5.x"
},
"devDependencies": {
"vows": ">=0.5.12"
"vows": ">=0.5.12",
"aws-sdk": "~2.0.0-rc.15"
},
"bundledDependencies": ["node-pre-gyp"],
"binary": {
"module_name": "node_expat",
"module_path": "./lib/binding/",
"host": "https://github.com/node-xmpp/node-expat/releases/download/v2.3.8"
},
"repository": {
"type": "git",
Expand Down