Permalink
Browse files

initial commit

  • Loading branch information...
crcn committed Mar 14, 2013
1 parent 4bd37bd commit 6c1de36fa5dba65dc9fe9e3c3d56301a26336e04
View
@@ -1,5 +1,10 @@
Nojam combines [npm](http://npmjs.org) modules with [jam](http://jamjs.org) modules, essentially making your node.js code accessible on the web!
+### Requirements
+
+- [node.js](http://nodejs.org)
+- [jamjs](http://jamjs.org) - `npm install jamjs -g`
+
## Installation
```
@@ -15,15 +20,11 @@ To install a node module for the web, call:
nojam install sift
```
-To install a jam module, call:
-
-```bash
-nojam install jam:jquery
-```
You can also be explicit about installing from npm as well:
```bash
nojam install npm:sift
+nojam install jam:jquery
```
View
@@ -1 +1,36 @@
#!/usr/bin/env node
+var commander = require("commander"),
+NoJam = require("../"),
+noJam = new NoJam({
+ pkg: loadPackage()
+});
+
+commander.
+command("install").
+description("installs a package from NPM, or JAM").
+action(function() {
+ var packages = Array.prototype.slice.call(arguments);
+ packages.pop()
+ noJam.install(packages);
+})
+
+
+commander.
+command("rebuild").
+description("rebuilds the NPM modules as JAM modules").
+action(function() {
+ noJam.rebuild();
+})
+
+
+commander.parse(process.argv);
+
+
+
+function loadPackage() {
+ try {
+ return require(process.cwd() + "/package.json");
+ } catch(e) {
+ return {}
+ }
+}
View
No changes.
Oops, something went wrong.

0 comments on commit 6c1de36

Please sign in to comment.