Permalink
Browse files

Use `npm` to install `nodeunit` and `rimraf`

Remove submodules, change paths when requiring these modules and fix
errors in `test/index.js`.
  • Loading branch information...
1 parent f82b9d9 commit db937576bde4d31726e92955cbc3d5baf2254fac @mmalecki mmalecki committed Dec 19, 2011
Showing with 19 additions and 24 deletions.
  1. +0 −6 .gitmodules
  2. +4 −0 package.json
  3. +1 −1 test/convenience-repo.js
  4. +6 −7 test/index.js
  5. +1 −1 test/raw-blob.js
  6. +1 −1 test/raw-commit.js
  7. +1 −1 test/raw-error.js
  8. +1 −1 test/raw-object.js
  9. +1 −1 test/raw-oid.js
  10. +1 −1 test/raw-reference.js
  11. +1 −1 test/raw-repo.js
  12. +1 −1 test/raw-revwalk.js
  13. +0 −1 vendor/nodeunit
  14. +0 −1 vendor/rimraf
View
@@ -1,9 +1,3 @@
-[submodule "vendor/nodeunit"]
- path = vendor/nodeunit
- url = git://github.com/caolan/nodeunit.git
-[submodule "vendor/rimraf"]
- path = vendor/rimraf
- url = git://github.com/isaacs/rimraf.git
[submodule "vendor/libgit2"]
path = vendor/libgit2
url = git://github.com/libgit2/libgit2.git
View
@@ -16,6 +16,10 @@
"engines": {
"node": "~0.6"
},
+ "devDependencies": {
+ "nodeunit": "0.6.x",
+ "rimraf": "1.0.x"
+ },
"scripts": {
"preinstall": "./configure",
"install": "make"
View
@@ -1,5 +1,5 @@
var git = require( "../" );
-var rimraf = require( "../vendor/rimraf");
+var rimraf = require("rimraf");
var fs = require( "fs" );
// Helper functions
View
@@ -1,27 +1,26 @@
try {
- var reporter = require( '../vendor/nodeunit' ).reporters['default'];
+ var reporter = require('nodeunit').reporters['default'];
}
catch( e ) {
var sys = require( 'util' );
sys.puts( 'Cannot find nodeunit module.' );
- sys.puts( 'You can download submodules for this project by doing:' );
+ sys.puts( 'You can install it by running:');
sys.puts( '' );
- sys.puts( ' git submodule update --init' );
+ sys.puts( ' npm install');
sys.puts( '' );
process.exit();
}
try {
- var rimraf = require( '../vendor/rimraf' );
+ var rimraf = require('rimraf');
}
catch(e) {
var sys = require( 'util' );
sys.puts( 'Cannot find rimraf module.' );
- sys.puts( 'You can download submodules for this project by doing:' );
+ sys.puts( 'You can install it by running:');
sys.puts( '' );
- sys.puts( ' git submodule init vendor/rimraf' );
- sys.puts( ' git submodule update vendor/rimraf' );
+ sys.puts( ' npm install');
sys.puts( '' );
process.exit();
}
View
@@ -1,6 +1,6 @@
var git = require( '../' ).raw
, path = require( 'path' )
- , rimraf = require( '../vendor/rimraf' );
+ , rimraf = require('rimraf');
var testRepo = new git.Repo();
View
@@ -1,5 +1,5 @@
var git = require( '../' ).raw,
- rimraf = require( '../vendor/rimraf' ) || require( 'rimraf' ),
+ rimraf = require( 'rimraf' ),
path = require( 'path' );
var testRepo = new git.Repo();
View
@@ -1,5 +1,5 @@
var git = require( '../' ).raw,
- rimraf = require( '../vendor/rimraf' ) || require( 'rimraf' );
+ rimraf = require('rimraf');
// Helper functions
var helper = {
View
@@ -1,5 +1,5 @@
var git = require( '../' ).raw,
- rimraf = require( '../vendor/rimraf' );
+ rimraf = require('rimraf');
// Helper functions
var helper = {
View
@@ -1,5 +1,5 @@
var git = require( '../' ).raw,
- rimraf = require( '../vendor/rimraf' );
+ rimraf = require('rimraf');
// Helper functions
var helper = {
View
@@ -1,5 +1,5 @@
var git = require( '../' ).raw,
- rimraf = require( '../vendor/rimraf' );
+ rimraf = require('rimraf');
// Helper functions
var helper = {
View
@@ -1,5 +1,5 @@
var git = require( '../' ).raw,
- rimraf = require( '../vendor/rimraf' ) || require( 'rimraf' ),
+ rimraf = require('rimraf'),
path = require( 'path' ),
fs = require( 'fs' );
View
@@ -1,5 +1,5 @@
var git = require( '../' ).raw,
- rimraf = require( '../vendor/rimraf' ) || require( 'rimraf' );
+ rimraf = require('rimraf');
var testRepo = new git.Repo();
Submodule nodeunit deleted from 1f2038
Submodule rimraf deleted from 7e9818

0 comments on commit db93757

Please sign in to comment.