Skip to content

Commit

Permalink
Merging JSML
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffsu committed Apr 1, 2011
1 parent 02ca53b commit bed2395
Show file tree
Hide file tree
Showing 20 changed files with 36 additions and 88 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
@@ -1,5 +1,11 @@
<<<<<<< Updated upstream
0.3.13 0.3.13
* fixed problem that doesn't allow toString methods * fixed problem that doesn't allow toString methods
=======
0.3.12
* fixed parse error in JSMLElement
* Yanking 0.3.11
>>>>>>> Stashed changes


0.3.11 0.3.11
* fixed minor issue finding Rails.root in rack * fixed minor issue finding Rails.root in rack
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.3.11 0.3.12
11 changes: 1 addition & 10 deletions dist/browser/js2-full.js
Expand Up @@ -18,7 +18,7 @@ function mainFunction (arg) {


var JS2 = root.JS2 = mainFunction; var JS2 = root.JS2 = mainFunction;
var js2 = root.js2 = JS2; var js2 = root.js2 = JS2;
js2.VERSION = "0.3.11"; js2.VERSION = "0.3.12";


JS2.ROOT = JS2; JS2.ROOT = JS2;


Expand Down Expand Up @@ -844,7 +844,6 @@ function mainFunction (arg) {
}, },


toString: function () { toString: function () {
console.log((new Validator(this.content)).getString());
var v = this.validate(/^(function)(\s+)(I)(\s*)(Braces)(\s*)(Block)/); var v = this.validate(/^(function)(\s+)(I)(\s*)(Braces)(\s*)(Block)/);
return 'OO.addMember("' + v[3] + '",' + "function" + v[2] + v[5] + ' ' + v[7] + ');'; return 'OO.addMember("' + v[3] + '",' + "function" + v[2] + v[5] + ' ' + v[7] + ');';
} }
Expand Down Expand Up @@ -1120,7 +1119,6 @@ JS2.Array.prototype.any = function() {
return this.length > 0; return this.length > 0;
}; };



JS2.Class.extend('FileSystem', function(KLASS, OO){ JS2.Class.extend('FileSystem', function(KLASS, OO){
OO.addMember("initialize",function (adapter) { OO.addMember("initialize",function (adapter) {
this.adapter = adapter; this.adapter = adapter;
Expand Down Expand Up @@ -1230,7 +1228,6 @@ JS2.Class.extend('FileSystem', function(KLASS, OO){
}); });
}); });



JS2.Class.extend('Updater', function(KLASS, OO){ JS2.Class.extend('Updater', function(KLASS, OO){
OO.addMember("initialize",function (fs, inDir, outDir, recursive) { OO.addMember("initialize",function (fs, inDir, outDir, recursive) {
this.recursive = recursive; this.recursive = recursive;
Expand Down Expand Up @@ -1276,7 +1273,6 @@ JS2.Class.extend('Updater', function(KLASS, OO){
}); });
}); });



JS2.Class.extend('Config', function(KLASS, OO){ JS2.Class.extend('Config', function(KLASS, OO){
OO.addMember("CLI_REGEX",/^-(r|i|f|n|v|m)(=(\w+))?$/); OO.addMember("CLI_REGEX",/^-(r|i|f|n|v|m)(=(\w+))?$/);
OO.addMember("optsLookup",{ OO.addMember("optsLookup",{
Expand Down Expand Up @@ -1348,7 +1344,6 @@ JS2.Class.extend('Config', function(KLASS, OO){


}); });



JS2.Class.extend('Commander', function(KLASS, OO){ JS2.Class.extend('Commander', function(KLASS, OO){
OO.addMember("BANNER","js2 <command> [options] <arguments>\n" + OO.addMember("BANNER","js2 <command> [options] <arguments>\n" +
"VERSION: " + JS2.VERSION + "\n" + "VERSION: " + JS2.VERSION + "\n" +
Expand Down Expand Up @@ -1435,7 +1430,6 @@ JS2.Class.extend('Commander', function(KLASS, OO){
}); });





JS2.Class.extend('BrowserDecorator', function(KLASS, OO){ JS2.Class.extend('BrowserDecorator', function(KLASS, OO){
OO.addMember("file",function (code) { OO.addMember("file",function (code) {
return code; return code;
Expand Down Expand Up @@ -1480,7 +1474,6 @@ JS2.Class.extend('RingoDecorator', function(KLASS, OO){


JS2.DECORATOR = JS2.DECORATOR || new JS2.BrowserDecorator(); JS2.DECORATOR = JS2.DECORATOR || new JS2.BrowserDecorator();



JS2.Class.extend('JSML', function(KLASS, OO){ JS2.Class.extend('JSML', function(KLASS, OO){
OO.addStaticMember("process",function (txt) { OO.addStaticMember("process",function (txt) {
return new KLASS(txt); return new KLASS(txt);
Expand Down Expand Up @@ -1566,10 +1559,8 @@ JS2.Class.extend('JSMLElement', function(KLASS, OO){
return ''; return '';
}); });
}); });

}); });



(function (undefined, JS2) { (function (undefined, JS2) {
JS2.require = function(file, callback) { JS2.require = function(file, callback) {
var xmlhttp; var xmlhttp;
Expand Down
3 changes: 1 addition & 2 deletions dist/browser/js2.js
Expand Up @@ -19,7 +19,7 @@ function mainFunction (arg) {


var JS2 = root.JS2 = mainFunction; var JS2 = root.JS2 = mainFunction;
var js2 = root.js2 = JS2; var js2 = root.js2 = JS2;
js2.VERSION = "0.3.11"; js2.VERSION = "0.3.12";


JS2.ROOT = JS2; JS2.ROOT = JS2;


Expand Down Expand Up @@ -270,7 +270,6 @@ JS2.Array.prototype.any = function() {
}; };





js2.ROOT = root; js2.ROOT = root;


return JS2; return JS2;
Expand Down
6 changes: 6 additions & 0 deletions dist/gem/CHANGELOG
@@ -1,5 +1,11 @@
<<<<<<< Updated upstream
0.3.13 0.3.13
* fixed problem that doesn't allow toString methods * fixed problem that doesn't allow toString methods
=======
0.3.12
* fixed parse error in JSMLElement
* Yanking 0.3.11
>>>>>>> Stashed changes


0.3.11 0.3.11
* fixed minor issue finding Rails.root in rack * fixed minor issue finding Rails.root in rack
Expand Down
2 changes: 1 addition & 1 deletion dist/gem/js2.gemspec
@@ -1,6 +1,6 @@
spec = Gem::Specification.new do |s| spec = Gem::Specification.new do |s|
s.name = 'js2' s.name = 'js2'
s.version = '0.3.11' s.version = '0.3.12'
s.summary = "Javascript Syntactic Sugar" s.summary = "Javascript Syntactic Sugar"
s.description = %{A superset of the Javascript language to make development easier.} s.description = %{A superset of the Javascript language to make development easier.}
s.files = Dir['bin/*'] + Dir['lib/**/*.rb'] + Dir['lib/**/*.js'] + [ 'CHANGELOG' ] s.files = Dir['bin/*'] + Dir['lib/**/*.rb'] + Dir['lib/**/*.js'] + [ 'CHANGELOG' ]
Expand Down
11 changes: 1 addition & 10 deletions dist/gem/lib/js2/js2.js
Expand Up @@ -14,7 +14,7 @@ function mainFunction (arg) {


var JS2 = root.JS2 = mainFunction; var JS2 = root.JS2 = mainFunction;
var js2 = root.js2 = JS2; var js2 = root.js2 = JS2;
js2.VERSION = "0.3.11"; js2.VERSION = "0.3.12";


JS2.ROOT = JS2; JS2.ROOT = JS2;


Expand Down Expand Up @@ -840,7 +840,6 @@ function mainFunction (arg) {
}, },


toString: function () { toString: function () {
console.log((new Validator(this.content)).getString());
var v = this.validate(/^(function)(\s+)(I)(\s*)(Braces)(\s*)(Block)/); var v = this.validate(/^(function)(\s+)(I)(\s*)(Braces)(\s*)(Block)/);
return 'OO.addMember("' + v[3] + '",' + "function" + v[2] + v[5] + ' ' + v[7] + ');'; return 'OO.addMember("' + v[3] + '",' + "function" + v[2] + v[5] + ' ' + v[7] + ');';
} }
Expand Down Expand Up @@ -1116,7 +1115,6 @@ JS2.Array.prototype.any = function() {
return this.length > 0; return this.length > 0;
}; };



JS2.Class.extend('FileSystem', function(KLASS, OO){ JS2.Class.extend('FileSystem', function(KLASS, OO){
OO.addMember("initialize",function (adapter) { OO.addMember("initialize",function (adapter) {
this.adapter = adapter; this.adapter = adapter;
Expand Down Expand Up @@ -1226,7 +1224,6 @@ JS2.Class.extend('FileSystem', function(KLASS, OO){
}); });
}); });



JS2.Class.extend('Updater', function(KLASS, OO){ JS2.Class.extend('Updater', function(KLASS, OO){
OO.addMember("initialize",function (fs, inDir, outDir, recursive) { OO.addMember("initialize",function (fs, inDir, outDir, recursive) {
this.recursive = recursive; this.recursive = recursive;
Expand Down Expand Up @@ -1272,7 +1269,6 @@ JS2.Class.extend('Updater', function(KLASS, OO){
}); });
}); });



JS2.Class.extend('Config', function(KLASS, OO){ JS2.Class.extend('Config', function(KLASS, OO){
OO.addMember("CLI_REGEX",/^-(r|i|f|n|v|m)(=(\w+))?$/); OO.addMember("CLI_REGEX",/^-(r|i|f|n|v|m)(=(\w+))?$/);
OO.addMember("optsLookup",{ OO.addMember("optsLookup",{
Expand Down Expand Up @@ -1344,7 +1340,6 @@ JS2.Class.extend('Config', function(KLASS, OO){


}); });



JS2.Class.extend('Commander', function(KLASS, OO){ JS2.Class.extend('Commander', function(KLASS, OO){
OO.addMember("BANNER","js2 <command> [options] <arguments>\n" + OO.addMember("BANNER","js2 <command> [options] <arguments>\n" +
"VERSION: " + JS2.VERSION + "\n" + "VERSION: " + JS2.VERSION + "\n" +
Expand Down Expand Up @@ -1431,7 +1426,6 @@ JS2.Class.extend('Commander', function(KLASS, OO){
}); });





JS2.Class.extend('BrowserDecorator', function(KLASS, OO){ JS2.Class.extend('BrowserDecorator', function(KLASS, OO){
OO.addMember("file",function (code) { OO.addMember("file",function (code) {
return code; return code;
Expand Down Expand Up @@ -1476,7 +1470,6 @@ JS2.Class.extend('RingoDecorator', function(KLASS, OO){


JS2.DECORATOR = JS2.DECORATOR || new JS2.BrowserDecorator(); JS2.DECORATOR = JS2.DECORATOR || new JS2.BrowserDecorator();



JS2.Class.extend('JSML', function(KLASS, OO){ JS2.Class.extend('JSML', function(KLASS, OO){
OO.addStaticMember("process",function (txt) { OO.addStaticMember("process",function (txt) {
return new KLASS(txt); return new KLASS(txt);
Expand Down Expand Up @@ -1562,11 +1555,9 @@ JS2.Class.extend('JSMLElement', function(KLASS, OO){
return ''; return '';
}); });
}); });

}); });





JS2.fs = new JS2.FileSystem(JS2_RUBY_FILE_ADAPTER); JS2.fs = new JS2.FileSystem(JS2_RUBY_FILE_ADAPTER);
js2.DECORATOR = new JS2.BrowserDecorator(); js2.DECORATOR = new JS2.BrowserDecorator();
js2.ROOT = root; js2.ROOT = root;
Expand Down
6 changes: 6 additions & 0 deletions dist/npm/CHANGELOG
@@ -1,5 +1,11 @@
<<<<<<< Updated upstream
0.3.13 0.3.13
* fixed problem that doesn't allow toString methods * fixed problem that doesn't allow toString methods
=======
0.3.12
* fixed parse error in JSMLElement
* Yanking 0.3.11
>>>>>>> Stashed changes


0.3.11 0.3.11
* fixed minor issue finding Rails.root in rack * fixed minor issue finding Rails.root in rack
Expand Down
12 changes: 1 addition & 11 deletions dist/npm/lib/js2.js
Expand Up @@ -14,7 +14,7 @@ function mainFunction (arg) {


var JS2 = root.JS2 = mainFunction; var JS2 = root.JS2 = mainFunction;
var js2 = root.js2 = JS2; var js2 = root.js2 = JS2;
js2.VERSION = "0.3.11"; js2.VERSION = "0.3.12";


JS2.ROOT = JS2; JS2.ROOT = JS2;


Expand Down Expand Up @@ -840,7 +840,6 @@ function mainFunction (arg) {
}, },


toString: function () { toString: function () {
console.log((new Validator(this.content)).getString());
var v = this.validate(/^(function)(\s+)(I)(\s*)(Braces)(\s*)(Block)/); var v = this.validate(/^(function)(\s+)(I)(\s*)(Braces)(\s*)(Block)/);
return 'OO.addMember("' + v[3] + '",' + "function" + v[2] + v[5] + ' ' + v[7] + ');'; return 'OO.addMember("' + v[3] + '",' + "function" + v[2] + v[5] + ' ' + v[7] + ');';
} }
Expand Down Expand Up @@ -1116,7 +1115,6 @@ JS2.Array.prototype.any = function() {
return this.length > 0; return this.length > 0;
}; };



JS2.Class.extend('FileSystem', function(KLASS, OO){ JS2.Class.extend('FileSystem', function(KLASS, OO){
OO.addMember("initialize",function (adapter) { OO.addMember("initialize",function (adapter) {
this.adapter = adapter; this.adapter = adapter;
Expand Down Expand Up @@ -1226,7 +1224,6 @@ JS2.Class.extend('FileSystem', function(KLASS, OO){
}); });
}); });



JS2.Class.extend('Updater', function(KLASS, OO){ JS2.Class.extend('Updater', function(KLASS, OO){
OO.addMember("initialize",function (fs, inDir, outDir, recursive) { OO.addMember("initialize",function (fs, inDir, outDir, recursive) {
this.recursive = recursive; this.recursive = recursive;
Expand Down Expand Up @@ -1272,7 +1269,6 @@ JS2.Class.extend('Updater', function(KLASS, OO){
}); });
}); });



JS2.Class.extend('Config', function(KLASS, OO){ JS2.Class.extend('Config', function(KLASS, OO){
OO.addMember("CLI_REGEX",/^-(r|i|f|n|v|m)(=(\w+))?$/); OO.addMember("CLI_REGEX",/^-(r|i|f|n|v|m)(=(\w+))?$/);
OO.addMember("optsLookup",{ OO.addMember("optsLookup",{
Expand Down Expand Up @@ -1344,7 +1340,6 @@ JS2.Class.extend('Config', function(KLASS, OO){


}); });



JS2.Class.extend('Commander', function(KLASS, OO){ JS2.Class.extend('Commander', function(KLASS, OO){
OO.addMember("BANNER","js2 <command> [options] <arguments>\n" + OO.addMember("BANNER","js2 <command> [options] <arguments>\n" +
"VERSION: " + JS2.VERSION + "\n" + "VERSION: " + JS2.VERSION + "\n" +
Expand Down Expand Up @@ -1431,7 +1426,6 @@ JS2.Class.extend('Commander', function(KLASS, OO){
}); });





JS2.Class.extend('BrowserDecorator', function(KLASS, OO){ JS2.Class.extend('BrowserDecorator', function(KLASS, OO){
OO.addMember("file",function (code) { OO.addMember("file",function (code) {
return code; return code;
Expand Down Expand Up @@ -1476,7 +1470,6 @@ JS2.Class.extend('RingoDecorator', function(KLASS, OO){


JS2.DECORATOR = JS2.DECORATOR || new JS2.BrowserDecorator(); JS2.DECORATOR = JS2.DECORATOR || new JS2.BrowserDecorator();



JS2.Class.extend('JSML', function(KLASS, OO){ JS2.Class.extend('JSML', function(KLASS, OO){
OO.addStaticMember("process",function (txt) { OO.addStaticMember("process",function (txt) {
return new KLASS(txt); return new KLASS(txt);
Expand Down Expand Up @@ -1562,11 +1555,9 @@ JS2.Class.extend('JSMLElement', function(KLASS, OO){
return ''; return '';
}); });
}); });

}); });





JS2.Class.extend('NodeFileAdapter', function(KLASS, OO){ JS2.Class.extend('NodeFileAdapter', function(KLASS, OO){
OO.addMember("initialize",function () { OO.addMember("initialize",function () {
this.fs = require('fs'); this.fs = require('fs');
Expand Down Expand Up @@ -1618,7 +1609,6 @@ JS2.Class.extend('JSMLElement', function(KLASS, OO){
}); });
}); });



JS2.fs = new JS2.FileSystem(new JS2.NodeFileAdapter()); JS2.fs = new JS2.FileSystem(new JS2.NodeFileAdapter());


js2.DECORATOR = new JS2.NodeDecorator(); js2.DECORATOR = new JS2.NodeDecorator();
Expand Down
2 changes: 1 addition & 1 deletion dist/npm/package.json
@@ -1,6 +1,6 @@
{ "name" : "js2", { "name" : "js2",
"description" : "Javascript Syntactic Sugar", "description" : "Javascript Syntactic Sugar",
"version" : "0.3.11", "version" : "0.3.12",
"author" : "Jeff Su", "author" : "Jeff Su",
"repository" : { "type" : "git" , "url" : "git://github.com/jeffsu/js2.git" }, "repository" : { "type" : "git" , "url" : "git://github.com/jeffsu/js2.git" },
"bugs" : { "web" : "http://github.com/jeffsu/js2/issues" }, "bugs" : { "web" : "http://github.com/jeffsu/js2/issues" },
Expand Down
11 changes: 1 addition & 10 deletions flavors/browser-full.js
Expand Up @@ -18,7 +18,7 @@ function mainFunction (arg) {


var JS2 = root.JS2 = mainFunction; var JS2 = root.JS2 = mainFunction;
var js2 = root.js2 = JS2; var js2 = root.js2 = JS2;
js2.VERSION = "0.3.11"; js2.VERSION = "0.3.12";


JS2.ROOT = JS2; JS2.ROOT = JS2;


Expand Down Expand Up @@ -844,7 +844,6 @@ function mainFunction (arg) {
}, },


toString: function () { toString: function () {
console.log((new Validator(this.content)).getString());
var v = this.validate(/^(function)(\s+)(I)(\s*)(Braces)(\s*)(Block)/); var v = this.validate(/^(function)(\s+)(I)(\s*)(Braces)(\s*)(Block)/);
return 'OO.addMember("' + v[3] + '",' + "function" + v[2] + v[5] + ' ' + v[7] + ');'; return 'OO.addMember("' + v[3] + '",' + "function" + v[2] + v[5] + ' ' + v[7] + ');';
} }
Expand Down Expand Up @@ -1120,7 +1119,6 @@ JS2.Array.prototype.any = function() {
return this.length > 0; return this.length > 0;
}; };



JS2.Class.extend('FileSystem', function(KLASS, OO){ JS2.Class.extend('FileSystem', function(KLASS, OO){
OO.addMember("initialize",function (adapter) { OO.addMember("initialize",function (adapter) {
this.adapter = adapter; this.adapter = adapter;
Expand Down Expand Up @@ -1230,7 +1228,6 @@ JS2.Class.extend('FileSystem', function(KLASS, OO){
}); });
}); });



JS2.Class.extend('Updater', function(KLASS, OO){ JS2.Class.extend('Updater', function(KLASS, OO){
OO.addMember("initialize",function (fs, inDir, outDir, recursive) { OO.addMember("initialize",function (fs, inDir, outDir, recursive) {
this.recursive = recursive; this.recursive = recursive;
Expand Down Expand Up @@ -1276,7 +1273,6 @@ JS2.Class.extend('Updater', function(KLASS, OO){
}); });
}); });



JS2.Class.extend('Config', function(KLASS, OO){ JS2.Class.extend('Config', function(KLASS, OO){
OO.addMember("CLI_REGEX",/^-(r|i|f|n|v|m)(=(\w+))?$/); OO.addMember("CLI_REGEX",/^-(r|i|f|n|v|m)(=(\w+))?$/);
OO.addMember("optsLookup",{ OO.addMember("optsLookup",{
Expand Down Expand Up @@ -1348,7 +1344,6 @@ JS2.Class.extend('Config', function(KLASS, OO){


}); });



JS2.Class.extend('Commander', function(KLASS, OO){ JS2.Class.extend('Commander', function(KLASS, OO){
OO.addMember("BANNER","js2 <command> [options] <arguments>\n" + OO.addMember("BANNER","js2 <command> [options] <arguments>\n" +
"VERSION: " + JS2.VERSION + "\n" + "VERSION: " + JS2.VERSION + "\n" +
Expand Down Expand Up @@ -1435,7 +1430,6 @@ JS2.Class.extend('Commander', function(KLASS, OO){
}); });





JS2.Class.extend('BrowserDecorator', function(KLASS, OO){ JS2.Class.extend('BrowserDecorator', function(KLASS, OO){
OO.addMember("file",function (code) { OO.addMember("file",function (code) {
return code; return code;
Expand Down Expand Up @@ -1480,7 +1474,6 @@ JS2.Class.extend('RingoDecorator', function(KLASS, OO){


JS2.DECORATOR = JS2.DECORATOR || new JS2.BrowserDecorator(); JS2.DECORATOR = JS2.DECORATOR || new JS2.BrowserDecorator();



JS2.Class.extend('JSML', function(KLASS, OO){ JS2.Class.extend('JSML', function(KLASS, OO){
OO.addStaticMember("process",function (txt) { OO.addStaticMember("process",function (txt) {
return new KLASS(txt); return new KLASS(txt);
Expand Down Expand Up @@ -1566,10 +1559,8 @@ JS2.Class.extend('JSMLElement', function(KLASS, OO){
return ''; return '';
}); });
}); });

}); });



(function (undefined, JS2) { (function (undefined, JS2) {
JS2.require = function(file, callback) { JS2.require = function(file, callback) {
var xmlhttp; var xmlhttp;
Expand Down

0 comments on commit bed2395

Please sign in to comment.