Permalink
Browse files

Initial commit

  • Loading branch information...
ryanwilliams committed Aug 21, 2011
0 parents commit 5a3d33c5780f47afa0cb6e18562f52355849b44f
@@ -0,0 +1 @@
+node_modules/
@@ -0,0 +1,5 @@
+.git
+.DS_Store
+*.swp
+*~
+tests/dummy/build/
20 LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2010-2011 Ryan Williams
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,12 @@
+Experimental; Do not use yet.
+
+Overview
+========
+
+Jah is simple [Node.js][nodejs] framework which enables you to build Web browser based
+applications using the [CommonJS][commonjs] module system. This means you can easily break
+your application up into separate directories and files and include them when
+needed using the `require` function.
+
+[commonjs]: http://wiki.commonjs.org/wiki/Modules/1.1.1
+[nodejs]: http://nodejs.org
@@ -0,0 +1,23 @@
+#!/usr/bin/env node
+
+var sys = require('sys'),
+ fs = require('fs'),
+ path = require('path');
+
+
+var localPath = path.normalize(path.join(process.cwd(), 'node_modules', '.bin', 'jah')),
+ isLocal = path.existsSync(localPath) && require.resolve(localPath) != __filename;
+
+// If the local project has its own Jah install, use that executable instead
+if (isLocal) {
+ require(localPath);
+} else {
+ require.paths.unshift(path.join(__dirname, '../lib'));
+
+ if (parseInt(process.version.split('.')[1], 10) < 2) {
+ sys.puts('ERROR: jah requires node version 0.2.x or higher, but you are using ' + process.version);
+ process.exit(1);
+ }
+
+ require('jah').main();
+}
@@ -0,0 +1 @@
+{ "jah_project": { "version": 0.1 } }
@@ -0,0 +1,22 @@
+/*globals require module exports process console*/
+/*jslint undef: true, strict: true, white: true, newcap: true, indent: 4 */
+"use strict";
+
+var sys = require('sys');
+
+exports.description = 'Show list of available commands';
+exports.run = function (opts) {
+ var commands = require('./');
+ sys.puts('Available commands are:');
+ for (var key in commands) {
+ if (commands.hasOwnProperty(key)) {
+ var command = 'jah ' + key;
+
+ var spaces = '';
+ for (var i = 0; i < 8 - key.length; i++) {
+ spaces += ' ';
+ }
+ sys.puts(' ' + command + spaces + ': ' + commands[key].description);
+ }
+ }
+};
@@ -0,0 +1,11 @@
+/*globals require module exports process console*/
+/*jslint undef: true, strict: true, white: true, newcap: true, indent: 4 */
+"use strict";
+
+var sys = require('sys');
+
+exports.description = 'Run the Cloud9 IDE';
+exports.run = function (opts) {
+ sys.puts('Not implemented yet');
+ process.exit(1);
+};
@@ -0,0 +1,7 @@
+module.exports = {
+ 'help': require('./help'),
+ 'new': require('./new'),
+ 'server': require('./server'),
+ 'make': require('./make'),
+ //'ide': require('./ide')
+};
Oops, something went wrong.

0 comments on commit 5a3d33c

Please sign in to comment.