Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
hanging-gardens
Advanced tools
A JavaScript project structure for NoRIA webpages.
A 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 and 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.
A 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.
behaviours
: contains files with code that makes a webpage or parts thereof
behave in a certain way. Think of these as controllers (as in MVC).helpers
: contains files with code that you need to use often in many
different files.widgets
: contains files with code for reusable components, like a sortable
table for example.lib
: contains files with code that doesn't fit in any of the other directories.package.json
: is a CommonJS/Package file which is compatible with the npm package manager.Take a look at the examples for more information.
Make sure you have Node.js and NPM installed (on OSX: brew install npm
).
npm install hanging-gardens -g
Next, make sure you have Yuicompressor installed
brew install yuicompressor
This will build a package.js
file.
git clone git://github.com/fd/hanging_gardens.js.git
cd hanging_gardens.js
garden examples/hello-world-js/package.json
# or
garden examples/hello-world-coffee/package.json
The package.js
file specifies the project dependencies and how the project files should be processed.
{ "type" : "application" // this enables the extra directories
, "main" : "./behaviours/index.js" // the main behaviour
// the dependecies
, "dependencies" :
{ "jquery": ">= 1.4.3"
}
}
In your package.json
file add this option:
"lint": true
In your package.json
file add this option:
"compression": "yui"
Just create a .coffee
file.
FAQs
A JavaScript project structure for NoRIA webpages.
The npm package hanging-gardens receives a total of 2 weekly downloads. As such, hanging-gardens popularity was classified as not popular.
We found that hanging-gardens demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.