Skip to content

Commit

Permalink
updated npmignore and package.json to ready for npm deployment - upda…
Browse files Browse the repository at this point in the history
…ted object and revwalk objects
  • Loading branch information
tbranyen committed Mar 8, 2011
1 parent dd4181b commit c063ef4
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 22 deletions.
6 changes: 6 additions & 0 deletions .npmignore
@@ -0,0 +1,6 @@
docs/
example/
test/
util/
vendor/nodeunit
vendor/rimraf
2 changes: 1 addition & 1 deletion example/dummyrepo
Submodule dummyrepo updated from d29b7f to 2f6cbe
4 changes: 4 additions & 0 deletions package.json
Expand Up @@ -18,5 +18,9 @@
}, },
"engines": { "engines": {
"node": "*" "node": "*"
},
"scripts": {
"preinstall": "./configure",
"install": "make && make install"
} }
} }
28 changes: 14 additions & 14 deletions src/object.cc
Expand Up @@ -33,20 +33,20 @@ void GitObject::Initialize (Handle<v8::Object> target) {
NODE_SET_PROTOTYPE_METHOD(constructor_template, "typeIsLoose", TypeIsLoose); NODE_SET_PROTOTYPE_METHOD(constructor_template, "typeIsLoose", TypeIsLoose);
NODE_SET_PROTOTYPE_METHOD(constructor_template, "size", Size); NODE_SET_PROTOTYPE_METHOD(constructor_template, "size", Size);


Local<Object> types = Object::New(); Local<Object> type = Object::New();


types->Set(String::New("ANY"), Integer::New(-2)); type->Set(String::New("ANY"), Integer::New(-2));
types->Set(String::New("BAD"), Integer::New(-1)); type->Set(String::New("BAD"), Integer::New(-1));
types->Set(String::New("_EXT1"), Integer::New(0)); type->Set(String::New("_EXT1"), Integer::New(0));
types->Set(String::New("COMMIT"), Integer::New(1)); type->Set(String::New("COMMIT"), Integer::New(1));
types->Set(String::New("TREE"), Integer::New(2)); type->Set(String::New("TREE"), Integer::New(2));
types->Set(String::New("BLOB"), Integer::New(3)); type->Set(String::New("BLOB"), Integer::New(3));
types->Set(String::New("TAG"), Integer::New(4)); type->Set(String::New("TAG"), Integer::New(4));
types->Set(String::New("_EXT2"), Integer::New(5)); type->Set(String::New("_EXT2"), Integer::New(5));
types->Set(String::New("OFS_DELTA"), Integer::New(6)); type->Set(String::New("OFS_DELTA"), Integer::New(6));
types->Set(String::New("REF_DELTA"), Integer::New(7)); type->Set(String::New("REF_DELTA"), Integer::New(7));


constructor_template->Set(String::New("types"), types); constructor_template->Set(String::New("type"), type);


target->Set(String::NewSymbol("Object"), constructor_template->GetFunction()); target->Set(String::NewSymbol("Object"), constructor_template->GetFunction());
} }
Expand Down
12 changes: 6 additions & 6 deletions src/revwalk.cc
Expand Up @@ -30,14 +30,14 @@ void RevWalk::Initialize(Handle<Object> target) {
NODE_SET_PROTOTYPE_METHOD(constructor_template, "free", Free); NODE_SET_PROTOTYPE_METHOD(constructor_template, "free", Free);
NODE_SET_PROTOTYPE_METHOD(constructor_template, "repository", Free); NODE_SET_PROTOTYPE_METHOD(constructor_template, "repository", Free);


Local<Object> types = Object::New(); Local<Object> sort = Object::New();


types->Set(String::New("NONE"), Integer::New(0)); sort->Set(String::New("NONE"), Integer::New(0));
types->Set(String::New("TOPOLOGICAL"), Integer::New(1)); sort->Set(String::New("TOPOLOGICAL"), Integer::New(1));
types->Set(String::New("TIME"), Integer::New(2)); sort->Set(String::New("TIME"), Integer::New(2));
types->Set(String::New("REVERSE"), Integer::New(4)); sort->Set(String::New("REVERSE"), Integer::New(4));


constructor_template->Set(String::New("types"), types); constructor_template->Set(String::New("sort"), sort);


target->Set(String::NewSymbol("RevWalk"), constructor_template->GetFunction()); target->Set(String::NewSymbol("RevWalk"), constructor_template->GetFunction());
} }
Expand Down
2 changes: 1 addition & 1 deletion test/dummyrepo
Submodule dummyrepo updated from 978fea to cb09e9

0 comments on commit c063ef4

Please sign in to comment.