{"_id":"ash","_rev":"20-b65fdc6fde3603276465da5a13d9d450","name":"ash","description":"Ash is a distributed presentation framework for the bohemian web developer.","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1rc":{"name":"ash","description":"A framework for the bohemian web developer","version":"0.0.1rc","author":{"name":"Ric Allinson","email":"ric@allinson.me"},"contributors":[],"dependencies":{"connect":">= 0.2.3","step":">= 0.0.3"},"keywords":["framework","web"],"main":"./lib/ash/index","directories":{"lib":"./lib/ash"},"engines":{"node":">= 0.1.98"},"_id":"ash@0.0.1rc","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/ash/-/ash-0.0.1rc.tgz","shasum":"e0fdb657f99ef7e73949347f21514fcab4a2044c","integrity":"sha512-ZjsfPWgLvWABlgT2uX5q7+Icc+S1upCKseWIzNF5ZjyFrtqRsjI6LwofkYnkmLOXoQ05IBJGRup5Ncqg3Mokqg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHwMEBrf+N6r3kWSrVsMW5AtOPVD7aL5WYb70EWoYZfdAiEAkYMe66DakLv8Ci9H/WPRjduYDcSrgnlO5Fm9eHx7aa4="}]}},"0.0.1":{"name":"ash","version":"0.0.1","description":"Ash is a framework for the bohemian web developer.","main":"./lib/adapters/node","author":{"name":"Richard S Allinson","email":"npm@mountainmansoftware.com"},"engines":{"node":">=0.6.0 < 0.9.0"},"bin":{"ash":"bin/ash"},"scripts":{"test":"mocha --recursive ./tests"},"dependencies":{"connect":"*","commander":"*","requirejs":"*"},"devDependencies":{"mocha":">=1.3.x"},"repository":{"type":"git","url":"https://github.com/capecodehq/ash.git"},"license":"MIT","_id":"ash@0.0.1","dist":{"shasum":"6cb39a47565b388bcaeb13e2f2fec15987195a19","tarball":"https://registry.npmjs.org/ash/-/ash-0.0.1.tgz","integrity":"sha512-fXGCxFMynvPbknRTYp0ycK9IuPsYXzjFfbsHJQBTbkYffQDk9AO//P15B/cQMCOQdgAbdrdQR+S13TR7jJlELw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZwpDVWIcoAeNxhS/6F/jx3jrNvikfY25Mn5vhqL2M8gIgWCNHIbtIYQZ9hnruJPuWpZSOlCQQ0MGjXtW1W5yuopc="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"mountainmansoftware","email":"npm@mountainmansoftware.com"},"maintainers":[{"name":"capecodehq","email":"ric@allinson.com"},{"name":"mountainmansoftware","email":"npm@mountainmansoftware.com"}],"directories":{}},"0.0.2":{"name":"ash","version":"0.0.2","description":"Ash is a distributed presentation framework for the bohemian web developer.","main":"./lib/adapters/node","author":{"name":"Richard S Allinson","email":"npm@mountainmansoftware.com"},"engines":{"node":">=0.6.0 < 0.9.0"},"bin":{"ash":"bin/ash"},"scripts":{"test":"mocha --recursive ./tests"},"dependencies":{"connect":"*","commander":"*","requirejs":"*"},"devDependencies":{"mocha":">=1.3.x"},"repository":{"type":"git","url":"https://github.com/capecodehq/ash.git"},"license":"MIT","_id":"ash@0.0.2","dist":{"shasum":"efe6a10216e26d8e85ab78d52c87daea9243ced7","tarball":"https://registry.npmjs.org/ash/-/ash-0.0.2.tgz","integrity":"sha512-ZQO2Ym2OcpqafwEcsaeqoFN4OUN3wUzXG/FtTFEdAUyJ7JqzxB/WgGoPtU+PhyrgXgJvzy6lX+Qcj9fqKk68jw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDueGCpQsOKUeNJ29DvXcZc+9eJ6YNe/b/dI+B7EbmrQwIga8mwg4v5TTYGwRgVLbN7lEZNRS2qs1PEjOXCgMeq+Xs="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"mountainmansoftware","email":"npm@mountainmansoftware.com"},"maintainers":[{"name":"capecodehq","email":"ric@allinson.com"},{"name":"mountainmansoftware","email":"npm@mountainmansoftware.com"}]}},"maintainers":[{"name":"capecodehq","email":"ric@allinson.com"},{"name":"mountainmansoftware","email":"npm@mountainmansoftware.com"}],"author":{"name":"Richard S Allinson","email":"npm@mountainmansoftware.com"},"time":{"modified":"2022-06-13T03:31:57.774Z","created":"2012-09-03T19:54:05.960Z","0.0.1rc":"2012-09-03T19:54:05.960Z","0.0.1":"2012-09-03T19:54:39.694Z","0.0.2":"2012-09-07T04:06:00.851Z"},"repository":{"type":"git","url":"https://github.com/capecodehq/ash.git"},"license":"MIT","readme":"# Ash welcomes you\n\n[![Build Status](https://secure.travis-ci.org/capecodehq/ash.png?branch=master)](http://travis-ci.org/capecodehq/ash)\n\n**Ash** is a distributed presentation framework for the bohemian web developer. Executed on Node.js or run in the client, **Ash** provides an intuitive, unrestrictive boudoir in which creators can frolic with and fondly tease the interwebs. The truths and understandings upheld in the body of code known as **Ash** are;\n\n* Distributed [MVC](http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93adapter) that executes on both client & server\n* Code, Convention, Configuration\n\n#### I'm still smoking this one\n\nThe project is still in its early stages and is currently showing signs of emergent behavior. Once it chills out I'll add the obligatory \"Getting Started\" documentation here.\n\n## The Story So Far\n\n__Ash__ helps you develop [HTML5 applications](http://diveintohtml5.info/offline.html) that run 100% in web browsers or in containers like [PhoneGap](http://phonegap.com/). With a bit of extra thinking you can serve these same applications as traditional web sites to maximize your codes use.\n\n### Run as a Web Server\n\nInstall __Ash__;\n\t\n\tnpm install ash -g\n\nCreate a file called _helloworld.js_ in an empty directory;\n\n\tdefine({\n        index: function (api) {\n            api.done(\"Hello world.\");\n        }\n    });\n\nIn the same directory start __Ash__;\n\n\tash start\n\nOpen [http://localhost:3000/?module=helloworld&method=index](http://localhost:3000/?module=helloworld&method=index) in a browser.\n\n### Run as a HTML5 Application\n\nTo run the same code 100% in the browser you need to add a file named _init.js_ with the content;\n\n\trequire([\"lib/adapters/dom\"]);\n\nThen start __Ash__ in _webapp_ mode;\n\n\tash webapp\n\nOpen [http://localhost:3000/?module=helloworld&method=index](http://localhost:3000/?module=helloworld&method=index) in a browser.\n\n## The Idea\n\n### A Serializable Request Object\n\n    request = {\n        module: \"\", // a relative path to a module\n        method: \"\", // the function to call on the module\n        inputs: {} // a map of values to be made avaliable to the function \n    };\n\n### A Functional Response Object\n\n    response = {\n        done: function (data, meta){\n            // Adapter to runtime\n        },\n        flush: function (data, meta) {\n            // Adapter to runtime\n        }\n    };\n\n### A Single Dispatcher Function\n\n    dispatcher = function (request, response) {\n        // Map request object to function (api)\n    };\n\n### A Runtime Agnostic Api Object\n\n    api = {\n        done: response.done,\n        flush: response.flush,\n        dispatch: dispatcher,\n        use: { /* helpers */ }\n    };\n\n### Function Collections\n\nDefined using the [Asynchronous Module Definition](https://github.com/amdjs/amdjs-api/wiki/AMD) API, __Function Collections__ are a grouping mechanism for organizing your code. Each function defined in the collection must take exactly one argument, the value of which is a __Runtime Agnostic Api Object__.\n\n    define({\n        index: function (api) {\n            api.done(\"Hello world.\");\n        }\n    });\n\n### Helper Objects\n\nDefined using the [Asynchronous Module Definition](https://github.com/amdjs/amdjs-api/wiki/AMD) API, __helpers__ are attached to a __Runtime Agnostic Api Object__ when specified in __Function Collections__. __Helpers__ can implement the function _init()_, which if present will be called immediately after the helper is created.\n\n\tdefine({\n\t\tinit: function (request, response, api) {\n\t\t\t// Store for use later\n\t\t},\n\t\tfunc: function () {\n\t\t\t// Add functions\n\t\t}\n\t});\n\nHelpers are specified in __Function Collections__ by the use of a _helpers_ attribute whose value is an array.\n\n\tdefine({\n\t\thelpers: [\"config\"],\n        index: function (api) {\n\t\t\tvar module = api.use.config.get(\"module\");\n            api.done(\"This is module: \" + module);\n        }\n    });\n\n## The API\n\n### A Module\n\nThe modules name it's relative path to the applications root (normally where you start __Ash__). For example the file _./foo.js_ would have a module name of _foo_ and the file _./foo/bar/baz.js_ would be named _foo/bar/baz_.\n\n\tdefine({\n        bar: function (api) {\n            api.done(\"Hello world.\");\n        },\n\t\tbaz: function (api) {\n\t\t\tapi.done(\"Goodbye cruel world.\");\n\t\t}\n    });\n\n#### Default URI Mapping to Module\n\n\thttp://localhost:3000/?module=foo&method=baz\n\n#### this.helpers\n\n\tdefine({\n        helpers: [\"a\", \"b\", \"c\"],\n\t\tbar: function (api) {\n\t\t\tvar baz = api.use.a.func();\n\t\t\tapi.done(baz);\n\t\t}\n    });\n\n### The Api Object\n\n#### api.done\n\n\tapi.done(data, meta);\n\n#### api.flush\n\n\tapi.flush(data, meta);\n\n#### api.dispatch\n\n\tapi.dispatch(request, response);\n\n#### api.use\n\n\tapi.use.module_name.module_func();\n\n### A Helper Module\n\n\tdefine({\n\t\tbar: function (baz) {\n\t\t\treturn baz + 1;\n\t\t}\n\t});\n\n#### this.init\n\n\tdefine({\n\t\tinit: function (request, response, api) {\n\t\t\t// ...\n\t\t},\n\t\tbar: function (baz) {\n\t\t\treturn baz + 1;\n\t\t}\n\t});\n\n-- http://progmofo.com/","readmeFilename":""}