forked from Joose/Joose
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d818ede
commit 3ad4c02
Showing
14 changed files
with
364 additions
and
10 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
var argv = require('optimist') | ||
.usage('Usage: $0 {OPTIONS}') | ||
.wrap(80) | ||
|
||
.option('root', { | ||
desc : 'A path directory which will act as a web root. Default is current working directory' | ||
}) | ||
|
||
.option('require', { | ||
alias : 'r', | ||
desc : 'A file to nodify' | ||
}) | ||
|
||
.option('help', { | ||
alias : 'h', | ||
desc : 'Show this message' | ||
}) | ||
.check(function (argv) { | ||
if (argv.help) throw '' | ||
|
||
if (!argv.require) throw new Error("At least one `require` option should be provided") | ||
}) | ||
.argv | ||
|
||
|
||
var path = require('path') | ||
|
||
var librarian = new require('librarian')({ | ||
root : path.resolve(argv.root || './') | ||
}) | ||
|
||
librarian.writeBundleTo(process.stdout, [].concat(argv.require || [])) | ||
|
||
process.stdout.end() |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.