{"_id":"hanging-gardens","_rev":"39-3845d8f5336de1c0a494fa95102bcfd2","name":"hanging-gardens","time":{"modified":"2022-06-18T18:57:18.937Z","created":"2010-12-21T12:13:44.950Z","0.0.1":"2010-12-21T12:13:44.950Z","0.0.2":"2010-12-21T12:13:44.950Z","0.0.3":"2010-12-21T12:13:44.950Z","0.0.4":"2010-12-21T12:13:44.950Z","1.0.0":"2010-12-21T12:13:44.950Z","1.0.1":"2010-12-21T12:13:44.950Z","1.1.0":"2010-12-21T12:13:44.950Z","1.1.1":"2010-12-21T16:21:25.337Z","1.1.2":"2010-12-22T16:11:00.848Z","1.1.3":"2010-12-23T09:31:24.868Z","2.0.0":"2011-06-27T08:24:38.468Z","2.0.1":"2011-06-27T09:42:12.031Z","2.0.2":"2011-06-27T09:44:20.643Z","2.0.3":"2012-12-18T11:00:50.668Z","2.0.4":"2013-02-05T11:54:38.925Z","2.0.5":"2013-02-25T13:28:42.516Z","2.0.6":"2015-05-07T10:17:08.684Z","2.0.7":"2015-05-07T10:29:30.671Z"},"maintainers":[{"name":"yvesvanbroekhoven","email":"yvesvanbroekhoven@gmail.com"}],"dist-tags":{"latest":"2.0.7"},"description":"A JavaScript project structure for NoRIA webpages.","readme":"# Hanging Gardens\n\nA JavaScript project structure for NoRIA webpages.\n\n\n### Philosophy\n\nA lot of effort is put in making JavaScript based RIA development easier. This is a good thing for RIAs. But NonRIA development, development of regular webpages, still feels like we are stuck in 1995. Sure, we have great libraries like [jQuery][jquery] and [MooTools][mootools] but we still treat our .js files like a bunch of hacks. I don't like hacks so I decided to make something that encourages us, developers, to start taking JavaScript coding serious. This was the birth of Hanging Gardens. Hanging Gardens provides an infrastructure to load js code (like you would load Ruby or PHP code) and it turns many small (and well structured) js files into one (often huge) file. This file can then be further optimized by Googles Closure Compiler or JSMin.\n\n\n### How does it work\n\nA new Hanging Gardens project contains four directories (behaviours, helpers, widgets and lib) and a `package.json` file. Here is an explanation of what should go in each directory or file.\n\n* `behaviours`: contains files with code that makes a webpage or parts thereof\n  behave in a certain way. Think of these as controllers (as in MVC).\n* `helpers`: contains files with code that you need to use often in many\n  different files.\n* `widgets`: contains files with code for reusable components, like a sortable\n  table for example.\n* `lib`: contains files with code that doesn't fit in any of the other directories.\n* `package.json`: is a [CommonJS/Package][cjs_package] file which is compatible with the [npm package manager][npm].\n\nTake a look at the [examples][examples] for more information.\n\n\n### Installation\n\nMake sure you have [Node.js][nodejs] and [NPM][npm] installed (on OSX: `brew install npm`).\n\n    npm install hanging-gardens -g\n\nNext, make sure you have Yuicompressor installed\n\n    brew install yuicompressor\n\n### Building the example\n\nThis will build a `package.js` file.\n\n    git clone git://github.com/fd/hanging_gardens.js.git\n    cd hanging_gardens.js\n    garden examples/hello-world-js/package.json\n    # or\n    garden examples/hello-world-coffee/package.json\n\n## The package.js file\n\nThe `package.js` file specifies the project dependencies and how the project files should be processed.\n\n### Format\n\n    { \"type\"    : \"application\"           // this enables the extra directories\n    , \"main\"    : \"./behaviours/index.js\" // the main behaviour\n\n    // the dependecies\n    , \"dependencies\" :\n      { \"jquery\": \">= 1.4.3\"\n      }\n    }\n\n### How to enable JSLint\n\nIn your `package.json` file add this option:\n\n    \"lint\": true\n\n\n### How to enable YUI Compressor\n\nIn your `package.json` file add this option:\n\n    \"compression\": \"yui\"\n\n\n### How to use Coffee Script\n\nJust create a `.coffee` file.\n\n\n  [examples]:     https://github.com/fd/hanging_gardens.js/tree/master/examples/\n  [coffee]:      http://jashkenas.github.com/coffee-script/\n  [jslint]:      http://www.jslint.com/\n  [yuicomp]:     http://developer.yahoo.com/yui/compressor/\n  [jquery]:      http://jquery.com/\n  [mootools]:    http://mootools.net/\n  [nodejs]:      http://nodejs.org/\n  [npm]:         http://npmjs.org/\n  [cjs_package]: http://wiki.commonjs.org/wiki/Packages/1.0\n\n","versions":{"2.0.6":{"name":"hanging-gardens","version":"2.0.6","author":{"name":"Simon Menke"},"description":"A JavaScript project structure for NoRIA webpages.","keywords":["javascript","language","compiler","packager","validator"],"licenses":[{"type":"MIT","url":"https://github.com/hanging-gardens/hanging_gardens.js/blob/master/LICENSE"}],"engines":{"node":">=0.2.4"},"main":"./lib/command","directories":{"lib":"./lib"},"bin":{"garden":"./bin/garden"},"dependencies":{"coffee-script":">= 0.9.5","watch":">= 0.2.1","hanging_gardens_registry":">= 2.0.0"},"repository":{"type":"git","url":"http://github.com/hanging-gardens/hanging_gardens.js.git"},"gitHead":"65c1e6848924ebe41494c4b0ac9444c3520ab366","bugs":{"url":"https://github.com/hanging-gardens/hanging_gardens.js/issues"},"homepage":"https://github.com/hanging-gardens/hanging_gardens.js","_id":"hanging-gardens@2.0.6","scripts":{},"_shasum":"b66e2db7bd61865b62de88ecfed4c277f6623dff","_from":".","_npmVersion":"2.7.3","_nodeVersion":"0.12.0","_npmUser":{"name":"yvesvanbroekhoven","email":"yvesvanbroekhoven@gmail.com"},"dist":{"shasum":"b66e2db7bd61865b62de88ecfed4c277f6623dff","tarball":"https://registry.npmjs.org/hanging-gardens/-/hanging-gardens-2.0.6.tgz","integrity":"sha512-MRPkSGJZ6Gk+pYQWMB0WIEM8IHasWU6eG/rnM3gH+5aqwhmWc2jufwOu6Ro+wvUTFdFQhFeaBsEz5yvhxWMnJA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDOtfvRC2TP/tZcKlDkZVQatlF6THQfXuF8HG2nzPHWAIgbBx1W8wDiBAdara8lx2QRzmQZHFbV+FqI46dHhly98c="}]},"maintainers":[{"name":"yvesvanbroekhoven","email":"yvesvanbroekhoven@gmail.com"}]},"2.0.7":{"name":"hanging-gardens","version":"2.0.7","author":{"name":"Simon Menke"},"description":"A JavaScript project structure for NoRIA webpages.","keywords":["javascript","language","compiler","packager","validator"],"licenses":[{"type":"MIT","url":"https://github.com/hanging-gardens/hanging_gardens.js/blob/master/LICENSE"}],"engines":{"node":">=0.2.4"},"main":"./lib/command","directories":{"lib":"./lib"},"bin":{"garden":"./bin/garden"},"dependencies":{"coffee-script":">= 0.9.5","watch":">= 0.2.1","hanging_gardens_registry":">= 2.0.0"},"repository":{"type":"git","url":"http://github.com/hanging-gardens/hanging_gardens.js.git"},"gitHead":"bf70dd5fe43126c7fc4104c94faf4c683cdd7650","bugs":{"url":"https://github.com/hanging-gardens/hanging_gardens.js/issues"},"homepage":"https://github.com/hanging-gardens/hanging_gardens.js","_id":"hanging-gardens@2.0.7","scripts":{},"_shasum":"1338c69ce466e436400021e70d28131226327ede","_from":".","_npmVersion":"2.7.3","_nodeVersion":"0.12.0","_npmUser":{"name":"yvesvanbroekhoven","email":"yvesvanbroekhoven@gmail.com"},"dist":{"shasum":"1338c69ce466e436400021e70d28131226327ede","tarball":"https://registry.npmjs.org/hanging-gardens/-/hanging-gardens-2.0.7.tgz","integrity":"sha512-bQqymz2wxH1HWb0sraeBE22v1HaSMQKPFnnxfiMm6+ukJY2hbx1+RAi4EP3XrqUEDK3P1cdw30LX+8/+vOvWuw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpnUqTbWG/G0ECMZyPVcg4vkR+u/MK6FvNh3DgYzCh8QIhAJb8+DdeuFyD/9h4ABN06Hto2MLWjJj3VOVpzyqtEH/c"}]},"maintainers":[{"name":"yvesvanbroekhoven","email":"yvesvanbroekhoven@gmail.com"}]}},"homepage":"https://github.com/hanging-gardens/hanging_gardens.js","keywords":["javascript","language","compiler","packager","validator"],"repository":{"type":"git","url":"http://github.com/hanging-gardens/hanging_gardens.js.git"},"author":{"name":"Simon Menke"},"bugs":{"url":"https://github.com/hanging-gardens/hanging_gardens.js/issues"},"readmeFilename":"README.md"}