Permalink
Browse files

Merge pull request #5 from chubas/master

Cleanup and organization of code
  • Loading branch information...
2 parents 50235f6 + daa8f31 commit 77eb9d5d0d207f2c028f120a0f401f9d6808c8b9 @azendal committed Jul 3, 2012
Showing with 339 additions and 310 deletions.
  1. +3 −0 CHANGELOG.markdown
  2. +38 −35 README.rdoc → README.markdown
  3. +0 −11 browser.html
  4. +217 −217 neon.js
  5. +0 −47 node.js
  6. +11 −0 test/browser.html
  7. +70 −0 test/neon_test.js
View
@@ -0,0 +1,3 @@
+1.0.0 (2012-06-23)
+
+ Cleaned up and packed Neon library, used already in production. Added usage files, improved documentation.
@@ -1,50 +1,53 @@
-= JavaScript DSL for Classical Inheritance
+= Neon
+
+== JavaScript DSL for Classical Inheritance
This files provides a DSL for the following design patterns:
* inheritance
* interface
* module
-It also provides a DSL for class creation.
+Neon packs a DSL for Class creation, that helps in making programs following an object oriented design.
-The phylosophy is that it should not try to emulate other languages, and it preserves the JavaScript good parts, but with a nicer syntax to create classes that ensure interfaces and include reusable functionality as modules.
+The philosophy is that it should not try to emulate other languages, so it preserves the JavaScript good parts,
+but with a nicer syntax to create classes that ensure interfaces and include reusable functionality as modules.
=== Usage
- Interface('Editable')({
- constructor : ['x'],
- prototype : ['x']
- });
-
- Module('Composition')({
- y : 5,
- prototype : {
- z : 3
- }
- });
-
- Module('Other')({
- a : 5,
- prototype : {
- b : 3
- }
- });
-
- Class('Overlay').inherits(Widget).ensures(Editable).includes(Composition, Other)({
- html : '<div></div>',
- prototype : {
- init : function (element){
- if(!element){
- element = document.createElement('div');
- element.innerHTML = 'hola';
- document.body.appendChild(element);
+ Interface('Editable')({
+ constructor : ['x'],
+ prototype : ['x']
+ });
+
+ Module('Composition')({
+ y : 5,
+ prototype : {
+ z : 3
+ }
+ });
+
+ Module('Other')({
+ a : 5,
+ prototype : {
+ b : 3
}
- },
- b : 5
- }
- });
-
+ });
+
+ Class('Overlay').inherits(Widget).ensures(Editable).includes(Composition, Other)({
+ html : '<div></div>',
+ prototype : {
+ init : function (element){
+ if(!element){
+ element = document.createElement('div');
+ element.innerHTML = 'hello';
+ document.body.appendChild(element);
+ }
+ },
+ b : 5
+ }
+ });
+
== License
Copyright (c) 2009 Fernando Trasviña
View
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>Neon</title>
- <script src="neon.js" type="text/javascript"></script>
-</head>
-<body>
- <h1>Neon</h1>
-</body>
-</html>
-
Oops, something went wrong.

0 comments on commit 77eb9d5

Please sign in to comment.