protobuf
Advanced tools
Comparing version 0.3.1 to 0.3.2
{ "name" : "protobuf", | ||
"version" : "0.3.1", | ||
"version" : "0.3.2", | ||
"description" : "Protocol Buffers for NodeJS", | ||
@@ -8,3 +8,3 @@ "author": { | ||
"main": "./build/Release/protobuf_for_node", | ||
"engines": { "node": ">= 0.6.0 < 0.7.0" }, | ||
"engines": { "node": "0.6.x" }, | ||
"repository": { | ||
@@ -15,4 +15,5 @@ "type": "git", | ||
"scripts": { | ||
"install": "PROTOBUF=/usr/local/lib node-waf configure clean build" | ||
"install": "PROTOBUF=/usr/local/lib node-waf configure clean build", | ||
"test": "node test/unittest.js" | ||
} | ||
} |
This is a fork of http://code.google.com/p/protobuf-for-node/ | ||
My intention is just to package it up nicely for NPM and to fix some bugs. | ||
It now works with the NodeJS 0.6.x series. | ||
I also intend to make it work with the NodeJS 0.6.x series. | ||
Prerequisites: | ||
-------------- | ||
NodeJS v0.4.X | ||
NodeJS v0.6.X | ||
npm | ||
To install on Ubuntu: | ||
--------------------- | ||
To install on Ubuntu and OSX: | ||
------------------------------- | ||
1. wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz | ||
2. tar -xzvf protobuf-2.4.1.tar.gz | ||
3. cd protobuf-2.4.1/ | ||
4. ./configure && make && sudo make install | ||
5. cd | ||
6. npm install protobuf | ||
7. echo "/home/chris/node_modules/protobuf/build/default/" | sudo tee /etc/ld.so.conf.d/protobuf.conf | ||
(replace /home/chris/node_modules with wherever you installed the module) | ||
8. sudo ldconfig | ||
9. run node, try "require('protobuf');" - you should see: { Schema: [Function: Schema] } | ||
The first steps are to build and install Google's protobuf library. Make sure you have the right version by running "protoc --version" after the install. | ||
wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz | ||
tar -xzvf protobuf-2.4.1.tar.gz | ||
cd protobuf-2.4.1/ | ||
./configure && make && sudo make install | ||
cd | ||
This installs the npm package. | ||
npm install protobuf | ||
For Ubuntu, the following step may be unneeded now. | ||
echo "/home/chris/node_modules/protobuf/build/Release/" | sudo tee /etc/ld.so.conf.d/protobuf.conf | ||
(replace /home/chris/node_modules with wherever you installed the module) | ||
For Ubuntu, update library paths. | ||
sudo ldconfig | ||
For OSX, you might need to add the path: | ||
export DYLD_LIBRARY_PATH=/home/chris/node_modules/protobuf/build/Release:/usr/local/lib:$DYLD_LIBRARY_PATH | ||
And test that it works... Run node, try | ||
require('protobuf');" | ||
you should see: | ||
{ Schema: [Function: Schema] } | ||
As seen from the instructions above, this is my first attempt at packaging a slightly complex C++ module for NPM. | ||
@@ -32,0 +50,0 @@ |
var assert = require('assert'), | ||
puts = require('util').puts, | ||
read = require('fs').readFileSync, | ||
Schema = require('protobuf_for_node').Schema; | ||
Schema = require('../').Schema; | ||
@@ -6,0 +6,0 @@ /* hack to make the tests pass with node v0.3.0's new Buffer model */ |
Sorry, the diff of this file is not supported yet
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
122346
19
58
1