Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make print-version script less dependent on node modules; fix webapp …
…manifest.
- Loading branch information
Showing
2 changed files
with
14 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
#!/usr/bin/env node | ||
// node script to emit the current version of the source code | ||
|
||
var requirejs = require('requirejs'); | ||
requirejs(['commander', 'fs', '../src/version'], function(program, fs, version){ | ||
program | ||
.version(version) | ||
.usage('') | ||
.parse(process.argv); | ||
var requirejs = require('../r.js'); | ||
requirejs(['../src/version'], function(version) { | ||
|
||
try { | ||
// use the node module 'commander' to give a nicer interface, | ||
// if installed. | ||
var program = require('commander'); | ||
program | ||
.version(version) | ||
.usage('') | ||
.parse(process.argv); | ||
} catch (e) { /* I guess it's not installed */ } | ||
|
||
console.log(version); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters