Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated npmignore and package.json to ready for npm deployment - upda…

…ted object and revwalk objects
  • Loading branch information...
commit c063ef4c4dc02ab9302a6066e87cb54a6e5c4097 1 parent dd4181b
@tbranyen tbranyen authored
View
6 .npmignore
@@ -0,0 +1,6 @@
+docs/
+example/
+test/
+util/
+vendor/nodeunit
+vendor/rimraf
2  example/dummyrepo
@@ -1 +1 @@
-Subproject commit d29b7fecf71d0ef4887071ac18dc87f40c2fd4e1
+Subproject commit 2f6cbe055f1a6ca0a3ba524ba88a7806ba507a89
View
4 package.json
@@ -18,5 +18,9 @@
},
"engines": {
"node": "*"
+ },
+ "scripts": {
+ "preinstall": "./configure",
+ "install": "make && make install"
}
}
View
28 src/object.cc
@@ -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, "size", Size);
- Local<Object> types = Object::New();
-
- types->Set(String::New("ANY"), Integer::New(-2));
- types->Set(String::New("BAD"), Integer::New(-1));
- types->Set(String::New("_EXT1"), Integer::New(0));
- types->Set(String::New("COMMIT"), Integer::New(1));
- types->Set(String::New("TREE"), Integer::New(2));
- types->Set(String::New("BLOB"), Integer::New(3));
- types->Set(String::New("TAG"), Integer::New(4));
- types->Set(String::New("_EXT2"), Integer::New(5));
- types->Set(String::New("OFS_DELTA"), Integer::New(6));
- types->Set(String::New("REF_DELTA"), Integer::New(7));
-
- constructor_template->Set(String::New("types"), types);
+ Local<Object> type = Object::New();
+
+ type->Set(String::New("ANY"), Integer::New(-2));
+ type->Set(String::New("BAD"), Integer::New(-1));
+ type->Set(String::New("_EXT1"), Integer::New(0));
+ type->Set(String::New("COMMIT"), Integer::New(1));
+ type->Set(String::New("TREE"), Integer::New(2));
+ type->Set(String::New("BLOB"), Integer::New(3));
+ type->Set(String::New("TAG"), Integer::New(4));
+ type->Set(String::New("_EXT2"), Integer::New(5));
+ type->Set(String::New("OFS_DELTA"), Integer::New(6));
+ type->Set(String::New("REF_DELTA"), Integer::New(7));
+
+ constructor_template->Set(String::New("type"), type);
target->Set(String::NewSymbol("Object"), constructor_template->GetFunction());
}
View
12 src/revwalk.cc
@@ -30,14 +30,14 @@ void RevWalk::Initialize(Handle<Object> target) {
NODE_SET_PROTOTYPE_METHOD(constructor_template, "free", 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));
- types->Set(String::New("TOPOLOGICAL"), Integer::New(1));
- types->Set(String::New("TIME"), Integer::New(2));
- types->Set(String::New("REVERSE"), Integer::New(4));
+ sort->Set(String::New("NONE"), Integer::New(0));
+ sort->Set(String::New("TOPOLOGICAL"), Integer::New(1));
+ sort->Set(String::New("TIME"), Integer::New(2));
+ 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());
}
2  test/dummyrepo
@@ -1 +1 @@
-Subproject commit 978feacee2432e67051f2714ec7d28ad80e16908
+Subproject commit cb09e99e91d41705197e0fb60823fdc7df776691
Please sign in to comment.
Something went wrong with that request. Please try again.