Skip to content

Commit

Permalink
- some progress
Browse files Browse the repository at this point in the history
  • Loading branch information
canonic-epicure committed Sep 2, 2011
1 parent d818ede commit 3ad4c02
Show file tree
Hide file tree
Showing 14 changed files with 364 additions and 10 deletions.
34 changes: 34 additions & 0 deletions bin/joose-nodify.js
@@ -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()
6 changes: 4 additions & 2 deletions dist.ini
Expand Up @@ -36,8 +36,10 @@ update_sources = 0

[Web::Bundle] ; after docs generation to avoid docs for bundles

[Web::NPM::Package]
main = joose-all.js
[Web::NPM::Package]
bin = nodify bin/joose-nofify.js

main = joose-all.js

dependency = optimist
dependency = temp
Expand Down
2 changes: 1 addition & 1 deletion lib/Joose/Attribute/Lazy.js
Expand Up @@ -37,7 +37,7 @@ Role('Joose.Attribute.Lazy', {
if (!me.hasValue(this)) {
var initializer = typeof lazy == 'function' ? lazy : this[ lazy.replace(/^this\./, '') ]

me.setValueTo(this, initializer.call(this, me))
me.setValueTo(this, initializer.apply(this, arguments))
}

return original.call(this)
Expand Down
52 changes: 47 additions & 5 deletions node_modules/librarian/lib/File.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

125 changes: 123 additions & 2 deletions node_modules/librarian/lib/Librarian.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

99 changes: 99 additions & 0 deletions node_modules/librarian/lib/ModuleResolver.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions node_modules/librarian/test_data/lib/Backend.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3ad4c02

Please sign in to comment.