Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 4 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 24, 2010
Charles Jolley Seed-ify optparse 76641e0
Charles Jolley Add repositories option 5da100b
Charles Jolley Bump to 1.1.1 0bc07fb
Commits on Mar 25, 2010
Charles Jolley Fix package.json lib property. Bump to 0.1.2 5b2db94
Showing with 18 additions and 8 deletions.
  1. +13 −0 package.json
  2. +5 −8 src/optparse.js
View
13 package.json
@@ -0,0 +1,13 @@
+{
+ "name": "optparse",
+ "description": "Command line option parser for Javascript",
+ "version": "0.1.2",
+
+ "directories": {
+ "lib": "src"
+ },
+
+ "repositories": [
+ { "type": "git", "url": "git://github.com/seedjs/optparse-js.git" }
+ ]
+}
View
13 src/optparse.js
@@ -4,10 +4,9 @@
//
// See README.md for license.
//
-var optparse = {};
-try{ optparse = exports } catch(e) {}; // Try to export the lib for node.js
-(function(self) {
-var VERSION = '1.0';
+var optparse = exports;
+
+var VERSION = module.pkg.version();
var LONG_SWITCH_RE = /^--\w/;
var SHORT_SWITCH_RE = /^-\w/;
var NUMBER_RE = /^(0x[A-Fa-f0-9]+)|([0-9]+\.[0-9]+)|(\d+)$/;
@@ -303,7 +302,5 @@ OptionParser.prototype = {
}
}
-self.VERSION = VERSION;
-self.OptionParser = OptionParser;
-
-})(optparse);
+optparse.VERSION = VERSION;
+optparse.OptionParser = OptionParser;

No commit comments for this range

Something went wrong with that request. Please try again.