Permalink
Browse files

- some progress

  • Loading branch information...
SamuraiJack committed Sep 2, 2011
1 parent 3ad4c02 commit ad0c6a77ec57177a9103840bf540d83fd8237db0
Showing with 10 additions and 8 deletions.
  1. +7 −6 bin/joose-nodify.js
  2. +2 −1 dist.ini
  3. +1 −1 lib/Joose.js
View
@@ -3,12 +3,14 @@ var argv = require('optimist')
.wrap(80)
.option('root', {
- desc : 'A path directory which will act as a web root. Default is current working directory'
+ desc : 'A path directory which will act as a web root. Default is current working directory',
+ 'default' : './'
})
.option('require', {
alias : 'r',
- desc : 'A file to nodify'
+ desc : 'A file to nodify (has the same semantic as `require` made in `root` directory. You can specify several `require`',
+ demand : true
})
.option('help', {
@@ -17,18 +19,17 @@ var argv = require('optimist')
})
.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 = require('librarian')
-var librarian = new require('librarian')({
+var librarian = new Librarian({
root : path.resolve(argv.root || './')
})
librarian.writeBundleTo(process.stdout, [].concat(argv.require || []))
-process.stdout.end()
+process.stdout.end()
View
@@ -37,12 +37,13 @@ update_sources = 0
[Web::Bundle] ; after docs generation to avoid docs for bundles
[Web::NPM::Package]
-bin = nodify bin/joose-nofify.js
+bin = nodify bin/joose-nodify.js
main = joose-all.js
dependency = optimist
dependency = temp
+dependency = detective
devDependency = test-run
View
@@ -19,7 +19,7 @@ Joose.VERSION = ({ /*VERSION*/ }).VERSION
if (typeof module != 'undefined') module.exports = Joose
-if (!Joose.is_NodeJS) this.Joose = Joose
+/*if (!Joose.is_NodeJS) */this.Joose = Joose
// Static helpers for Arrays

0 comments on commit ad0c6a7

Please sign in to comment.