Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

node-pre-gyp support #1

Merged
merged 3 commits into from
Apr 20, 2015
Merged
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
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.travis.yml
appveyor.yml
test.bat
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
os: linux
language: node_js
node_js:
- node
- '0.10'
- iojs
sudo: false
env:
global:
- secure: ER5LYPXeYbQz8IH7IFlEOdiUFhQZ/he6MBiKgAQlUEaY+aF48Ypd9FaXue0R6OPxqBoTVA6rFixdiAZk7U0wB9wTzyABWWUBEmFO7WMbDWfFp4cOTbtHGQREBotYv0vaC8L+qgRDqtM0ASGm8/i8duRM1ICQ7n3N01ezAlMTu8I=
- secure: hlJfOM3VG9xYFQ+TrGWgIc5H2zowRGJBtIm710Mg5JQ4F6tpz7wzIZ+MpynGOklD8ltuLhUUSmf+doejVzCiRRADqF2ubjTRWafyqfz8p5nESz0ovw4g+rQuOOt3S4FbmKiHCZtoYEqn1N47GIaN06ucakK+rvS2DANgpSwOLPI=
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
Javascript + C++ BSON parser
============================
# bson-ext

This module contains the C++ BSON parser only and is not meant to be used in isolation from the `bson` NPM module. It lives in it's own module so it can be an optional dependency for the `bson` module.
[![linux build status](https://secure.travis-ci.org/imlucas/bson-ext.png)](http://travis-ci.org/imlucas/bson-ext)
[![windows build status](https://ci.appveyor.com/api/projects/status/github/imlucas/bson-ext)](https://ci.appveyor.com/project/imlucas/bson-ext)

This module contains the C++ BSON parser only and is not meant to be used in
isolation from the [bson](http://npm.im/bson) NPM module. It lives in
it's own module so it can be an optional dependency for the
[bson](http://npm.im/bson) module.


## Testing

```
npm test
```

## Prebuilt Binaries

bson-ext uses [node-pre-gyp](http://npm.im/node-pre-gyp) to publish and install
prebuilt binaries. This means you don't need the full toolchain installed
and configured correctly to use this module.

## License

Apache 2
30 changes: 12 additions & 18 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
# Test against this version of Node.js
# node.js support: Latest stable version, `0.10.x`
# iojs support: Latest stable version
environment:
node_pre_gyp_accessKeyId:
secure: Q/MT3KqteKjl23ePjDY9V93G8Ey91LJAOcvJPdEh0i4=
node_pre_gyp_secretAccessKey:
secure: pF+hGI1d/+HVKL0EWCGY6YxvRZrfQrLoxfG5AqQTLJ9hJZaiRRQTwU8cwL+4IEuW
matrix:
# node.js
- nodejs_version: "0.10"
- nodejs_version: "0.12"
# io.js
- nodejs_version: "1.6"
- nodejs_version: 0.10
- nodejs_version: 0.12
- nodejs_version: "1"

platform:
- x86
- x64

# Install scripts. (runs after repo cloning)
install:
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version
# install modules
- npm install
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)

# Post-install test scripts.
test_script:
# Output useful info for debugging.
- node --version
- npm --version
# run tests
- npm test
- .\test.bat

# Don't actually build.
build: off
build: OFF
12 changes: 12 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
'targets': [
{
'win_delay_load_hook': 'true',
'target_name': 'bson',
'sources': [ 'ext/bson.cc' ],
'cflags!': [ '-fno-exceptions' ],
Expand All @@ -11,6 +12,17 @@
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
}
}],
['OS=="win"', {
'configurations': {
'Release': {
'msvs_settings': {
'VCCLCompilerTool': {
'ExceptionHandling': 1
}
}
}
}
}]
]
}
Expand Down
79 changes: 54 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,56 @@
{ "name" : "bson-ext"
, "description" : "The C++ bson parser for the node.js mongodb driver."
, "keywords" : ["mongodb", "bson", "parser"]
, "version" : "0.1.0"
, "author" : "Christian Amor Kvalheim <christkv@gmail.com>"
, "contributors" : []

, "repository" : { "type" : "git"
, "url" : "git://github.com/christkv/bson-ext.git" }
, "bugs" : { "mail" : "node-mongodb-native@googlegroups.com"
, "url" : "https://github.com/christkv/bson-ext/issues" }
, "dependencies": {
"nan": "1.7.0"
{
"name": "bson-ext",
"description": "The C++ bson parser for the node.js mongodb driver.",
"keywords": [
"mongodb",
"bson",
"parser"
],
"version": "0.1.0",
"author": "Christian Amor Kvalheim <christkv@gmail.com>",
"contributors": [],
"repository": {
"type": "git",
"url": "git://github.com/christkv/bson-ext.git"
},
"bugs": {
"mail": "node-mongodb-native@googlegroups.com",
"url": "https://github.com/christkv/bson-ext/issues"
},
"dependencies": {
"nan": "~1.7.0",
"node-pre-gyp": "https://github.com/mongodb-js/node-pre-gyp/archive/v0.6.5-appveyor.tar.gz"
},
"bundledDependecies": [
"node-pre-gyp"
],
"devDependencies": {
"aws-sdk": "~2.1.20",
"nodeunit": "~0.9.0"
},
"main": "./index",
"directories": {
"lib": "./lib/bson"
},
"engines": {
"node": ">=0.8.19"
},
"scripts": {
"install": "node-pre-gyp install --fallback-to-build",
"test": "nodeunit ./test/node",
"posttest": "node-pre-gyp publish-maybe"
},
"licenses": [
{
"type": "Apache License, Version 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0"
}
],
"binary": {
"module_name": "bson",
"module_path": "build/Release",
"host": "https://bin.mongodb.org",
"remote_path": "/js/bson-ext/v{version}",
"bucket": "mongodb-dx-public"
}
, "devDependencies": {
"nodeunit": "0.9.0"
}
, "main": "./index"
, "directories" : { "lib" : "./lib/bson" }
, "engines" : { "node" : ">=0.8.19" }
, "scripts": {
"install" : "(node-gyp rebuild 2> builderror.log) || (exit 0)",
"test" : "nodeunit ./test/node"
}
, "licenses" : [ { "type" : "Apache License, Version 2.0"
, "url" : "http://www.apache.org/licenses/LICENSE-2.0" } ]
}
10 changes: 10 additions & 0 deletions test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
call node --version
call npm --version
SET GYP_MSVS_VERSION=2013
SET PATH=%PATH%;%APPDATA%\npm
SET PATH=%PATH%;C:\Program Files (x86)\Git\bin
SET PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin
call npm install https://github.com/mongodb-js/node-pre-gyp/archive/v0.6.5-appveyor.tar.gz
call npm install https://github.com/mongodb-js/node-gyp/archive/v1.04-appveyor.tar.gz
call npm install --build-from-source
call npm test