Permalink
Browse files

getting deps all set up again

  • Loading branch information...
1 parent a4c71aa commit d72e94612b8df35f016e0ca7ae8befca7d281e0b Techwraith committed Oct 7, 2012
@@ -24,7 +24,7 @@
.span6.info
h3 Bug reports and feature requests
p We love getting feedback from the community. Voice your opinion and hear about new features on the mailing list, contribute to our issue list, or go fix a bug yourself.
- a(href="") Report a bug.
+ a(href="http://github.com/mde/geddy/issues") Report a bug.
.span6.box
- for (var i=0; i<6; i++) {
- star = stars.pop();
@@ -50,5 +50,5 @@
.span6.info
h3 Example Applications
p Take a look at our example apps in the Github repo. Learn how to requre authentication, hook your app up to MongoDB, or use Jade as your templating language.
- a(href="") Learn by example.
+ a(href="http://github.com/mde/geddy/tree/master/examples") Learn by example.
@@ -4,17 +4,35 @@
h2 Frequently asked questions
.row.content
.span8
- h3 Which templating engines does Geddy support?
- p In relation to buildings, architecture has to do with the planning, designing and constructing form, space and ambience that reflect functional, technical, social, environmental, and aesthetic considerations. It requires the creative manipulation and coordination of material, technology, light and shadow. Architecture also encompasses the pragmatic aspects of realizing buildings and structures, including scheduling, cost estimating and construction administration. As documentation produced by architects, typically drawings, plans and technical specifications, architecture defines the structure and/or behavior of a building or any other kind of system that is to be or has been constructed.
- ul
- li EJS
- li Jade
- li Handlebars
- li Mustache
- h3 Which databases does Geddy's model layer have adapters for?
- p In relation to buildings, architecture has to do with the planning, designing and constructing form, space and ambience that reflect functional, technical, social, environmental, and aesthetic considerations. It requires the creative manipulation and coordination of material, technology, light and shadow. Architecture also encompasses the pragmatic aspects of realizing buildings and structures, including scheduling, cost estimating and construction administration. As documentation produced by architects, typically drawings, plans and technical specifications, architecture defines the structure and/or behavior of a building or any other kind of system that is to be or has been constructed.
- h4#Router-match.subsection .match
- p In relation to buildings, architecture has to do with the planning, designing and constructing form, space and ambience that reflect functional, technical, social, environmental, and aesthetic considerations. It requires the creative manipulation and coordination of material, technology, light and shadow. Architecture also encompasses the pragmatic aspects of realizing buildings and structures, including scheduling, cost estimating and construction administration. As documentation produced by architects, typically drawings, plans and technical specifications, architecture defines the structure and/or behavior of a building or any other kind of system that is to be or has been constructed.
- pre
- code
- | router.match( '/products', 'GET' ).to( 'products.index' )
+
+ :markdown
+
+ ### Which templating engines does Geddy support?
+ + EJS
+ + Jade
+ + Handlebars
+ + Mustache
+
+ ### Which databases does Geddy's model layer have adapters for?
+ + MongoDB
+ + Postgres
+ + Riak
+ + in-memory
+
+ ### Which database adapter does Geddy's model layer default to?
+ Geddy defaults to using the in-memory adapter for newly generated apps, but it's easy to change if you'd like.
+
+ ### Do I have to use the same database adapter for all of my models?
+ Nope! Geddy was built with data versatility in mind. Each of your models can define it's own adapter, or it can fall back to your globally set adapter.
+
+ ### How does Geddy scale across multiple processes?
+ Geddy uses Node's built in cluster module to create worker processes. This is configurable on an environment to environment basis.
+
+ ### Does Geddy support resourceful routes?
+ Yep! Just use the router's built in '[resource](/documentation#router.resource)' method and it will build out a full restful API for your resource.
+
+ ### Can Geddy generate an app structure for me?
+ Yes it can, just use the '[geddy app](/documentation#CLIapp)' command.
+
+ ### Can it scaffold resources for me too?
+ Yep - the '[geddy scaffold](/documentation#CLIscaffold)' command is the one you're looking for.
@@ -20,7 +20,7 @@ var Parser = require('./parser')
* Library version.
*/
-exports.version = '0.27.5';
+exports.version = '0.27.6';
/**
* Expose self closing tags.
@@ -10,7 +10,8 @@
*/
var Lexer = require('./lexer')
- , nodes = require('./nodes');
+ , nodes = require('./nodes')
+ , utils = require('./utils');
/**
* Initialize `Parser` with the given input `str` and `filename`.
@@ -485,7 +486,7 @@ Parser.prototype = {
var path = join(dir, path)
, str = fs.readFileSync(path, 'utf8')
, parser = new Parser(str, path, this.options);
- parser.blocks = this.blocks;
+ parser.blocks = utils.merge({}, this.blocks);
parser.mixins = this.mixins;
this.context(parser);
@@ -46,4 +46,19 @@ var escape = exports.escape = function(str) {
exports.text = function(str){
return interpolate(escape(str));
-};
+};
+
+/**
+ * Merge `b` into `a`.
+ *
+ * @param {Object} a
+ * @param {Object} b
+ * @return {Object}
+ * @api public
+ */
+
+exports.merge = function(a, b) {
+ for (var key in b) a[key] = b[key];
+ return a;
+};
+
@@ -30,8 +30,5 @@
},
"readme": "# Commander.js\n\n The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander).\n\n [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js)\n\n## Installation\n\n $ npm install commander\n\n## Option parsing\n\n Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .version('0.0.1')\n .option('-p, --peppers', 'Add peppers')\n .option('-P, --pineapple', 'Add pineapple')\n .option('-b, --bbq', 'Add bbq sauce')\n .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')\n .parse(process.argv);\n\nconsole.log('you ordered a pizza with:');\nif (program.peppers) console.log(' - peppers');\nif (program.pineapple) console.log(' - pineappe');\nif (program.bbq) console.log(' - bbq');\nconsole.log(' - %s cheese', program.cheese);\n```\n\n Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as \"--template-engine\" are camel-cased, becoming `program.templateEngine` etc.\n\n## Automated --help\n\n The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:\n\n``` \n $ ./examples/pizza --help\n\n Usage: pizza [options]\n\n Options:\n\n -V, --version output the version number\n -p, --peppers Add peppers\n -P, --pineapple Add pineappe\n -b, --bbq Add bbq sauce\n -c, --cheese <type> Add the specified type of cheese [marble]\n -h, --help output usage information\n\n```\n\n## Coercion\n\n```js\nfunction range(val) {\n return val.split('..').map(Number);\n}\n\nfunction list(val) {\n return val.split(',');\n}\n\nprogram\n .version('0.0.1')\n .usage('[options] <file ...>')\n .option('-i, --integer <n>', 'An integer argument', parseInt)\n .option('-f, --float <n>', 'A float argument', parseFloat)\n .option('-r, --range <a>..<b>', 'A range', range)\n .option('-l, --list <items>', 'A list', list)\n .option('-o, --optional [value]', 'An optional value')\n .parse(process.argv);\n\nconsole.log(' int: %j', program.integer);\nconsole.log(' float: %j', program.float);\nconsole.log(' optional: %j', program.optional);\nprogram.range = program.range || [];\nconsole.log(' range: %j..%j', program.range[0], program.range[1]);\nconsole.log(' list: %j', program.list);\nconsole.log(' args: %j', program.args);\n```\n\n## Custom help\n\n You can display arbitrary `-h, --help` information\n by listening for \"--help\". Commander will automatically\n exit once you are done so that the remainder of your program\n does not execute causing undesired behaviours, for example\n in the following executable \"stuff\" will not output when\n `--help` is used.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('../');\n\nfunction list(val) {\n return val.split(',').map(Number);\n}\n\nprogram\n .version('0.0.1')\n .option('-f, --foo', 'enable some foo')\n .option('-b, --bar', 'enable some bar')\n .option('-B, --baz', 'enable some baz');\n\n// must be before .parse() since\n// node's emit() is immediate\n\nprogram.on('--help', function(){\n console.log(' Examples:');\n console.log('');\n console.log(' $ custom-help --help');\n console.log(' $ custom-help -h');\n console.log('');\n});\n\nprogram.parse(process.argv);\n\nconsole.log('stuff');\n```\n\nyielding the following help output:\n\n```\n\nUsage: custom-help [options]\n\nOptions:\n\n -h, --help output usage information\n -V, --version output the version number\n -f, --foo enable some foo\n -b, --bar enable some bar\n -B, --baz enable some baz\n\nExamples:\n\n $ custom-help --help\n $ custom-help -h\n\n```\n\n## .prompt(msg, fn)\n\n Single-line prompt:\n\n```js\nprogram.prompt('name: ', function(name){\n console.log('hi %s', name);\n});\n```\n\n Multi-line prompt:\n\n```js\nprogram.prompt('description:', function(name){\n console.log('hi %s', name);\n});\n```\n\n Coercion:\n\n```js\nprogram.prompt('Age: ', Number, function(age){\n console.log('age: %j', age);\n});\n```\n\n```js\nprogram.prompt('Birthdate: ', Date, function(date){\n console.log('date: %s', date);\n});\n```\n\n## .password(msg[, mask], fn)\n\nPrompt for password without echoing:\n\n```js\nprogram.password('Password: ', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\nPrompt for password with mask char \"*\":\n\n```js\nprogram.password('Password: ', '*', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\n## .confirm(msg, fn)\n\n Confirm with the given `msg`:\n\n```js\nprogram.confirm('continue? ', function(ok){\n console.log(' got %j', ok);\n});\n```\n\n## .choose(list, fn)\n\n Let the user choose from a `list`:\n\n```js\nvar list = ['tobi', 'loki', 'jane', 'manny', 'luna'];\n\nconsole.log('Choose the coolest pet:');\nprogram.choose(list, function(i){\n console.log('you chose %d \"%s\"', i, list[i]);\n});\n```\n\n## Links\n\n - [API documentation](http://visionmedia.github.com/commander.js/)\n - [ascii tables](https://github.com/LearnBoost/cli-table)\n - [progress bars](https://github.com/visionmedia/node-progress)\n - [more progress bars](https://github.com/substack/node-multimeter)\n - [examples](https://github.com/visionmedia/commander.js/tree/master/examples)\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"_id": "commander@0.6.1",
- "dist": {
- "shasum": "7f941f38876bb4f2f3a62522830c9f60594c4178"
- },
"_from": "commander@0.6.1"
}
@@ -28,8 +28,5 @@
},
"readme": "mkdirp\n======\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\nexample\n=======\n\npow.js\n------\n var mkdirp = require('mkdirp');\n \n mkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n });\n\nOutput\n pow!\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\nmethods\n=======\n\nvar mkdirp = require('mkdirp');\n\nmkdirp(dir, mode, cb)\n---------------------\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\nmkdirp.sync(dir, mode)\n----------------------\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n npm install mkdirp\n\nlicense\n=======\n\nMIT/X11\n",
"_id": "mkdirp@0.3.4",
- "dist": {
- "shasum": "a6f4acf755e6f8ad666425968f230a744aa3c353"
- },
"_from": "mkdirp@0.3.x"
}
Oops, something went wrong.
@@ -0,0 +1,2 @@
+.git*
+test/
@@ -0,0 +1,19 @@
+Copyright (c) 2011-2012, Christopher Jeffrey (https://github.com/chjj/)
+
+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,9 @@
+all:
+ @cp lib/marked.js marked.js
+ @uglifyjs -o marked.min.js marked.js
+
+clean:
+ @rm marked.js
+ @rm marked.min.js
+
+.PHONY: clean all
@@ -0,0 +1,125 @@
+# marked
+
+A full-featured markdown parser and compiler, written in javascript.
+Built for speed.
+
+## Benchmarks
+
+node v0.4.x
+
+``` bash
+$ node test --bench
+marked completed in 12071ms.
+showdown (reuse converter) completed in 27387ms.
+showdown (new converter) completed in 75617ms.
+markdown-js completed in 70069ms.
+```
+
+node v0.6.x
+
+``` bash
+$ node test --bench
+marked completed in 6448ms.
+marked (gfm) completed in 7357ms.
+marked (pedantic) completed in 6092ms.
+discount completed in 7314ms.
+showdown (reuse converter) completed in 16018ms.
+showdown (new converter) completed in 18234ms.
+markdown-js completed in 24270ms.
+```
+
+__Marked is now faster than Discount, which is written in C.__
+
+For those feeling skeptical: These benchmarks run the entire markdown test suite
+1000 times. The test suite tests every feature. It doesn't cater to specific
+aspects.
+
+## Install
+
+``` bash
+$ npm install marked
+```
+
+## Another Javascript Markdown Parser
+
+The point of marked was to create a markdown compiler where it was possible to
+frequently parse huge chunks of markdown without having to worry about
+caching the compiled output somehow...or blocking for an unnecesarily long time.
+
+marked is very concise and still implements all markdown features. It is also
+now fully compatible with the client-side.
+
+marked more or less passes the official markdown test suite in its
+entirety. This is important because a surprising number of markdown compilers
+cannot pass more than a few tests. It was very difficult to get marked as
+compliant as it is. It could have cut corners in several areas for the sake
+of performance, but did not in order to be exactly what you expect in terms
+of a markdown rendering. In fact, this is why marked could be considered at a
+disadvantage in the benchmarks above.
+
+Along with implementing every markdown feature, marked also implements
+[GFM features](http://github.github.com/github-flavored-markdown/).
+
+## Options
+
+marked has 4 different switches which change behavior.
+
+- __pedantic__: Conform to obscure parts of `markdown.pl` as much as possible.
+ Don't fix any of the original markdown bugs or poor behavior.
+- __gfm__: Enable github flavored markdown (enabled by default).
+- __sanitize__: Sanitize the output. Ignore any HTML that has been input.
+- __highlight__: A callback to highlight code blocks.
+
+None of the above are mutually exclusive/inclusive.
+
+## Usage
+
+``` js
+// Set default options
+marked.setOptions({
+ gfm: true,
+ pedantic: false,
+ sanitize: true,
+ // callback for code highlighter
+ highlight: function(code, lang) {
+ if (lang === 'js') {
+ return javascriptHighlighter(code);
+ }
+ return code;
+ }
+});
+console.log(marked('i am using __markdown__.'));
+```
+
+You also have direct access to the lexer and parser if you so desire.
+
+``` js
+var tokens = marked.lexer(text);
+console.log(marked.parser(tokens));
+```
+
+``` bash
+$ node
+> require('marked').lexer('> i am using marked.')
+[ { type: 'blockquote_start' },
+ { type: 'paragraph',
+ text: 'i am using marked.' },
+ { type: 'blockquote_end' },
+ links: {} ]
+```
+
+## CLI
+
+``` bash
+$ marked -o hello.html
+hello world
+^D
+$ cat hello.html
+<p>hello world</p>
+```
+
+## License
+
+Copyright (c) 2011-2012, Christopher Jeffrey. (MIT License)
+
+See LICENSE for more info.
Oops, something went wrong.

0 comments on commit d72e946

Please sign in to comment.