Permalink
Browse files

Updated to work with latest version of Node.js

  • Loading branch information...
1 parent 4ecb94d commit 9adf000e59e63706b0153fde3440a1af656972fc @jfd committed Dec 3, 2009
Showing with 5 additions and 5 deletions.
  1. +2 −2 README.md
  2. +3 −3 examples/nodejs-test.js
View
4 README.md
@@ -12,10 +12,10 @@ QUICK START
The library defines one class, the OptionParser class. The class constructor takes one single argument, a list with a set of rules. Here is a quick example:
// Import the sys library
- var sys = require('/sys.js');
+ var sys = require('sys');
// Import the optparse library.
- var optparse = require('optparse.js');
+ var optparse = require('optparse');
// Define an option called ´´help´´. We give it a quick alias named ´´-h´´
// and a quick help text.
View
6 examples/nodejs-test.js
@@ -1,7 +1,7 @@
// Import the optparse script
-var optparse = require('../src/optparse.js');
+var optparse = require('../src/optparse');
-node.mixin(require("/utils.js"));
+process.mixin(require("utils"));
// Define some options
var SWITCHES = [
@@ -63,7 +63,7 @@ parser.on('help', function() {
});
// Parse command line arguments
-parser.parse(ARGV);
+parser.parse(process.ARGV);
if(print_summary) {
puts("First non-switch argument is: " + first_arg);

0 comments on commit 9adf000

Please sign in to comment.