Comparing version 0.4.3 to 0.4.4
@@ -6,3 +6,3 @@ var compile, fs, path, optparse, switches, parser, printUsage, mainfile, output, options, ext; | ||
optparse = require('optparse'); | ||
switches = [['-h', '--help', "shows this help section"], ['-b', '--bare', "compile without a top-level function wrapper"], ['-w', '--watch', "watch source files and recompile when any change"], ['-l', '--lib PATH', "add an additional search directory for source files"]]; | ||
switches = [['-h', '--help', "shows this help section and exit"], ['-v', '--version', "print the version number and exit"], ['-b', '--bare', "compile without a top-level function wrapper"], ['-w', '--watch', "watch source files and recompile when any change"], ['-l', '--lib PATH', "add an additional search directory for source files"]]; | ||
parser = new optparse.OptionParser(switches); | ||
@@ -17,2 +17,11 @@ printUsage = function(){ | ||
}); | ||
parser.on('version', function(){ | ||
var lib_dir, pkg_path, data, pkg; | ||
lib_dir = path.dirname(fs.realpathSync(__filename)); | ||
pkg_path = path.resolve(lib_dir, "..", "package.json"); | ||
data = fs.readFileSync(pkg_path, 'utf8'); | ||
pkg = JSON.parse(data); | ||
console.log(pkg.version); | ||
process.exit(1); | ||
}); | ||
mainfile = null; | ||
@@ -19,0 +28,0 @@ parser.on(0, function(it){ |
{ | ||
"name": "jspackage", | ||
"description": "build tool which adds client-side import syntax", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"author": { | ||
@@ -20,3 +20,3 @@ "name": "Andrew Kelley", | ||
"coffee-script": "~1.3.3", | ||
"coco": "~0.7.5", | ||
"coco": "~0.7.6", | ||
"LiveScript": "~0.9.11b", | ||
@@ -23,0 +23,0 @@ "temp": "~0.4.0" |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
15887
485
1