From bed239574b501453ee0f22330c71562aff44ce0b Mon Sep 17 00:00:00 2001 From: Jeff Su Date: Sat, 2 Apr 2011 00:06:14 +0800 Subject: [PATCH] Merging JSML --- CHANGELOG | 6 ++++++ VERSION | 2 +- dist/browser/js2-full.js | 11 +---------- dist/browser/js2.js | 3 +-- dist/gem/CHANGELOG | 6 ++++++ dist/gem/js2.gemspec | 2 +- dist/gem/lib/js2/js2.js | 11 +---------- dist/npm/CHANGELOG | 6 ++++++ dist/npm/lib/js2.js | 12 +----------- dist/npm/package.json | 2 +- flavors/browser-full.js | 11 +---------- flavors/browser.js | 3 +-- flavors/js2.gemspec | 2 +- flavors/node.js | 12 +----------- flavors/node.package.json | 2 +- flavors/ringo-full.js | 12 +----------- flavors/ringo.js | 3 +-- flavors/ringo.package.json | 2 +- flavors/ruby.js | 11 +---------- src/Common/JSML.js2 | 5 ++--- 20 files changed, 36 insertions(+), 88 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a83e1bf..fb4b410 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,11 @@ +<<<<<<< Updated upstream 0.3.13 * 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 * fixed minor issue finding Rails.root in rack diff --git a/VERSION b/VERSION index 2080591..0b9c019 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.11 +0.3.12 diff --git a/dist/browser/js2-full.js b/dist/browser/js2-full.js index c589990..c1f8639 100644 --- a/dist/browser/js2-full.js +++ b/dist/browser/js2-full.js @@ -18,7 +18,7 @@ function mainFunction (arg) { var JS2 = root.JS2 = mainFunction; var js2 = root.js2 = JS2; - js2.VERSION = "0.3.11"; + js2.VERSION = "0.3.12"; JS2.ROOT = JS2; @@ -844,7 +844,6 @@ function mainFunction (arg) { }, toString: function () { - console.log((new Validator(this.content)).getString()); var v = this.validate(/^(function)(\s+)(I)(\s*)(Braces)(\s*)(Block)/); return 'OO.addMember("' + v[3] + '",' + "function" + v[2] + v[5] + ' ' + v[7] + ');'; } @@ -1120,7 +1119,6 @@ JS2.Array.prototype.any = function() { return this.length > 0; }; - JS2.Class.extend('FileSystem', function(KLASS, OO){ OO.addMember("initialize",function (adapter) { this.adapter = adapter; @@ -1230,7 +1228,6 @@ JS2.Class.extend('FileSystem', function(KLASS, OO){ }); }); - JS2.Class.extend('Updater', function(KLASS, OO){ OO.addMember("initialize",function (fs, inDir, outDir, recursive) { this.recursive = recursive; @@ -1276,7 +1273,6 @@ JS2.Class.extend('Updater', function(KLASS, OO){ }); }); - JS2.Class.extend('Config', function(KLASS, OO){ OO.addMember("CLI_REGEX",/^-(r|i|f|n|v|m)(=(\w+))?$/); OO.addMember("optsLookup",{ @@ -1348,7 +1344,6 @@ JS2.Class.extend('Config', function(KLASS, OO){ }); - JS2.Class.extend('Commander', function(KLASS, OO){ OO.addMember("BANNER","js2 [options] \n" + "VERSION: " + JS2.VERSION + "\n" + @@ -1435,7 +1430,6 @@ JS2.Class.extend('Commander', function(KLASS, OO){ }); - JS2.Class.extend('BrowserDecorator', function(KLASS, OO){ OO.addMember("file",function (code) { return code; @@ -1480,7 +1474,6 @@ JS2.Class.extend('RingoDecorator', function(KLASS, OO){ JS2.DECORATOR = JS2.DECORATOR || new JS2.BrowserDecorator(); - JS2.Class.extend('JSML', function(KLASS, OO){ OO.addStaticMember("process",function (txt) { return new KLASS(txt); @@ -1566,10 +1559,8 @@ JS2.Class.extend('JSMLElement', function(KLASS, OO){ return ''; }); }); - }); - (function (undefined, JS2) { JS2.require = function(file, callback) { var xmlhttp; diff --git a/dist/browser/js2.js b/dist/browser/js2.js index 7857504..99d5dd9 100644 --- a/dist/browser/js2.js +++ b/dist/browser/js2.js @@ -19,7 +19,7 @@ function mainFunction (arg) { var JS2 = root.JS2 = mainFunction; var js2 = root.js2 = JS2; - js2.VERSION = "0.3.11"; + js2.VERSION = "0.3.12"; JS2.ROOT = JS2; @@ -270,7 +270,6 @@ JS2.Array.prototype.any = function() { }; - js2.ROOT = root; return JS2; diff --git a/dist/gem/CHANGELOG b/dist/gem/CHANGELOG index a83e1bf..fb4b410 100644 --- a/dist/gem/CHANGELOG +++ b/dist/gem/CHANGELOG @@ -1,5 +1,11 @@ +<<<<<<< Updated upstream 0.3.13 * 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 * fixed minor issue finding Rails.root in rack diff --git a/dist/gem/js2.gemspec b/dist/gem/js2.gemspec index c36f8a0..64dccc1 100644 --- a/dist/gem/js2.gemspec +++ b/dist/gem/js2.gemspec @@ -1,6 +1,6 @@ spec = Gem::Specification.new do |s| s.name = 'js2' - s.version = '0.3.11' + s.version = '0.3.12' s.summary = "Javascript Syntactic Sugar" s.description = %{A superset of the Javascript language to make development easier.} s.files = Dir['bin/*'] + Dir['lib/**/*.rb'] + Dir['lib/**/*.js'] + [ 'CHANGELOG' ] diff --git a/dist/gem/lib/js2/js2.js b/dist/gem/lib/js2/js2.js index 38139fe..cd9fbbf 100644 --- a/dist/gem/lib/js2/js2.js +++ b/dist/gem/lib/js2/js2.js @@ -14,7 +14,7 @@ function mainFunction (arg) { var JS2 = root.JS2 = mainFunction; var js2 = root.js2 = JS2; - js2.VERSION = "0.3.11"; + js2.VERSION = "0.3.12"; JS2.ROOT = JS2; @@ -840,7 +840,6 @@ function mainFunction (arg) { }, toString: function () { - console.log((new Validator(this.content)).getString()); var v = this.validate(/^(function)(\s+)(I)(\s*)(Braces)(\s*)(Block)/); return 'OO.addMember("' + v[3] + '",' + "function" + v[2] + v[5] + ' ' + v[7] + ');'; } @@ -1116,7 +1115,6 @@ JS2.Array.prototype.any = function() { return this.length > 0; }; - JS2.Class.extend('FileSystem', function(KLASS, OO){ OO.addMember("initialize",function (adapter) { this.adapter = adapter; @@ -1226,7 +1224,6 @@ JS2.Class.extend('FileSystem', function(KLASS, OO){ }); }); - JS2.Class.extend('Updater', function(KLASS, OO){ OO.addMember("initialize",function (fs, inDir, outDir, recursive) { this.recursive = recursive; @@ -1272,7 +1269,6 @@ JS2.Class.extend('Updater', function(KLASS, OO){ }); }); - JS2.Class.extend('Config', function(KLASS, OO){ OO.addMember("CLI_REGEX",/^-(r|i|f|n|v|m)(=(\w+))?$/); OO.addMember("optsLookup",{ @@ -1344,7 +1340,6 @@ JS2.Class.extend('Config', function(KLASS, OO){ }); - JS2.Class.extend('Commander', function(KLASS, OO){ OO.addMember("BANNER","js2 [options] \n" + "VERSION: " + JS2.VERSION + "\n" + @@ -1431,7 +1426,6 @@ JS2.Class.extend('Commander', function(KLASS, OO){ }); - JS2.Class.extend('BrowserDecorator', function(KLASS, OO){ OO.addMember("file",function (code) { return code; @@ -1476,7 +1470,6 @@ JS2.Class.extend('RingoDecorator', function(KLASS, OO){ JS2.DECORATOR = JS2.DECORATOR || new JS2.BrowserDecorator(); - JS2.Class.extend('JSML', function(KLASS, OO){ OO.addStaticMember("process",function (txt) { return new KLASS(txt); @@ -1562,11 +1555,9 @@ JS2.Class.extend('JSMLElement', function(KLASS, OO){ return ''; }); }); - }); - JS2.fs = new JS2.FileSystem(JS2_RUBY_FILE_ADAPTER); js2.DECORATOR = new JS2.BrowserDecorator(); js2.ROOT = root; diff --git a/dist/npm/CHANGELOG b/dist/npm/CHANGELOG index a83e1bf..fb4b410 100644 --- a/dist/npm/CHANGELOG +++ b/dist/npm/CHANGELOG @@ -1,5 +1,11 @@ +<<<<<<< Updated upstream 0.3.13 * 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 * fixed minor issue finding Rails.root in rack diff --git a/dist/npm/lib/js2.js b/dist/npm/lib/js2.js index c1af701..8653a14 100644 --- a/dist/npm/lib/js2.js +++ b/dist/npm/lib/js2.js @@ -14,7 +14,7 @@ function mainFunction (arg) { var JS2 = root.JS2 = mainFunction; var js2 = root.js2 = JS2; - js2.VERSION = "0.3.11"; + js2.VERSION = "0.3.12"; JS2.ROOT = JS2; @@ -840,7 +840,6 @@ function mainFunction (arg) { }, toString: function () { - console.log((new Validator(this.content)).getString()); var v = this.validate(/^(function)(\s+)(I)(\s*)(Braces)(\s*)(Block)/); return 'OO.addMember("' + v[3] + '",' + "function" + v[2] + v[5] + ' ' + v[7] + ');'; } @@ -1116,7 +1115,6 @@ JS2.Array.prototype.any = function() { return this.length > 0; }; - JS2.Class.extend('FileSystem', function(KLASS, OO){ OO.addMember("initialize",function (adapter) { this.adapter = adapter; @@ -1226,7 +1224,6 @@ JS2.Class.extend('FileSystem', function(KLASS, OO){ }); }); - JS2.Class.extend('Updater', function(KLASS, OO){ OO.addMember("initialize",function (fs, inDir, outDir, recursive) { this.recursive = recursive; @@ -1272,7 +1269,6 @@ JS2.Class.extend('Updater', function(KLASS, OO){ }); }); - JS2.Class.extend('Config', function(KLASS, OO){ OO.addMember("CLI_REGEX",/^-(r|i|f|n|v|m)(=(\w+))?$/); OO.addMember("optsLookup",{ @@ -1344,7 +1340,6 @@ JS2.Class.extend('Config', function(KLASS, OO){ }); - JS2.Class.extend('Commander', function(KLASS, OO){ OO.addMember("BANNER","js2 [options] \n" + "VERSION: " + JS2.VERSION + "\n" + @@ -1431,7 +1426,6 @@ JS2.Class.extend('Commander', function(KLASS, OO){ }); - JS2.Class.extend('BrowserDecorator', function(KLASS, OO){ OO.addMember("file",function (code) { return code; @@ -1476,7 +1470,6 @@ JS2.Class.extend('RingoDecorator', function(KLASS, OO){ JS2.DECORATOR = JS2.DECORATOR || new JS2.BrowserDecorator(); - JS2.Class.extend('JSML', function(KLASS, OO){ OO.addStaticMember("process",function (txt) { return new KLASS(txt); @@ -1562,11 +1555,9 @@ JS2.Class.extend('JSMLElement', function(KLASS, OO){ return ''; }); }); - }); - JS2.Class.extend('NodeFileAdapter', function(KLASS, OO){ OO.addMember("initialize",function () { this.fs = require('fs'); @@ -1618,7 +1609,6 @@ JS2.Class.extend('JSMLElement', function(KLASS, OO){ }); }); - JS2.fs = new JS2.FileSystem(new JS2.NodeFileAdapter()); js2.DECORATOR = new JS2.NodeDecorator(); diff --git a/dist/npm/package.json b/dist/npm/package.json index aa9a387..0fa7027 100644 --- a/dist/npm/package.json +++ b/dist/npm/package.json @@ -1,6 +1,6 @@ { "name" : "js2", "description" : "Javascript Syntactic Sugar", - "version" : "0.3.11", + "version" : "0.3.12", "author" : "Jeff Su", "repository" : { "type" : "git" , "url" : "git://github.com/jeffsu/js2.git" }, "bugs" : { "web" : "http://github.com/jeffsu/js2/issues" }, diff --git a/flavors/browser-full.js b/flavors/browser-full.js index c589990..c1f8639 100644 --- a/flavors/browser-full.js +++ b/flavors/browser-full.js @@ -18,7 +18,7 @@ function mainFunction (arg) { var JS2 = root.JS2 = mainFunction; var js2 = root.js2 = JS2; - js2.VERSION = "0.3.11"; + js2.VERSION = "0.3.12"; JS2.ROOT = JS2; @@ -844,7 +844,6 @@ function mainFunction (arg) { }, toString: function () { - console.log((new Validator(this.content)).getString()); var v = this.validate(/^(function)(\s+)(I)(\s*)(Braces)(\s*)(Block)/); return 'OO.addMember("' + v[3] + '",' + "function" + v[2] + v[5] + ' ' + v[7] + ');'; } @@ -1120,7 +1119,6 @@ JS2.Array.prototype.any = function() { return this.length > 0; }; - JS2.Class.extend('FileSystem', function(KLASS, OO){ OO.addMember("initialize",function (adapter) { this.adapter = adapter; @@ -1230,7 +1228,6 @@ JS2.Class.extend('FileSystem', function(KLASS, OO){ }); }); - JS2.Class.extend('Updater', function(KLASS, OO){ OO.addMember("initialize",function (fs, inDir, outDir, recursive) { this.recursive = recursive; @@ -1276,7 +1273,6 @@ JS2.Class.extend('Updater', function(KLASS, OO){ }); }); - JS2.Class.extend('Config', function(KLASS, OO){ OO.addMember("CLI_REGEX",/^-(r|i|f|n|v|m)(=(\w+))?$/); OO.addMember("optsLookup",{ @@ -1348,7 +1344,6 @@ JS2.Class.extend('Config', function(KLASS, OO){ }); - JS2.Class.extend('Commander', function(KLASS, OO){ OO.addMember("BANNER","js2 [options] \n" + "VERSION: " + JS2.VERSION + "\n" + @@ -1435,7 +1430,6 @@ JS2.Class.extend('Commander', function(KLASS, OO){ }); - JS2.Class.extend('BrowserDecorator', function(KLASS, OO){ OO.addMember("file",function (code) { return code; @@ -1480,7 +1474,6 @@ JS2.Class.extend('RingoDecorator', function(KLASS, OO){ JS2.DECORATOR = JS2.DECORATOR || new JS2.BrowserDecorator(); - JS2.Class.extend('JSML', function(KLASS, OO){ OO.addStaticMember("process",function (txt) { return new KLASS(txt); @@ -1566,10 +1559,8 @@ JS2.Class.extend('JSMLElement', function(KLASS, OO){ return ''; }); }); - }); - (function (undefined, JS2) { JS2.require = function(file, callback) { var xmlhttp; diff --git a/flavors/browser.js b/flavors/browser.js index 7857504..99d5dd9 100644 --- a/flavors/browser.js +++ b/flavors/browser.js @@ -19,7 +19,7 @@ function mainFunction (arg) { var JS2 = root.JS2 = mainFunction; var js2 = root.js2 = JS2; - js2.VERSION = "0.3.11"; + js2.VERSION = "0.3.12"; JS2.ROOT = JS2; @@ -270,7 +270,6 @@ JS2.Array.prototype.any = function() { }; - js2.ROOT = root; return JS2; diff --git a/flavors/js2.gemspec b/flavors/js2.gemspec index c36f8a0..64dccc1 100644 --- a/flavors/js2.gemspec +++ b/flavors/js2.gemspec @@ -1,6 +1,6 @@ spec = Gem::Specification.new do |s| s.name = 'js2' - s.version = '0.3.11' + s.version = '0.3.12' s.summary = "Javascript Syntactic Sugar" s.description = %{A superset of the Javascript language to make development easier.} s.files = Dir['bin/*'] + Dir['lib/**/*.rb'] + Dir['lib/**/*.js'] + [ 'CHANGELOG' ] diff --git a/flavors/node.js b/flavors/node.js index c1af701..8653a14 100644 --- a/flavors/node.js +++ b/flavors/node.js @@ -14,7 +14,7 @@ function mainFunction (arg) { var JS2 = root.JS2 = mainFunction; var js2 = root.js2 = JS2; - js2.VERSION = "0.3.11"; + js2.VERSION = "0.3.12"; JS2.ROOT = JS2; @@ -840,7 +840,6 @@ function mainFunction (arg) { }, toString: function () { - console.log((new Validator(this.content)).getString()); var v = this.validate(/^(function)(\s+)(I)(\s*)(Braces)(\s*)(Block)/); return 'OO.addMember("' + v[3] + '",' + "function" + v[2] + v[5] + ' ' + v[7] + ');'; } @@ -1116,7 +1115,6 @@ JS2.Array.prototype.any = function() { return this.length > 0; }; - JS2.Class.extend('FileSystem', function(KLASS, OO){ OO.addMember("initialize",function (adapter) { this.adapter = adapter; @@ -1226,7 +1224,6 @@ JS2.Class.extend('FileSystem', function(KLASS, OO){ }); }); - JS2.Class.extend('Updater', function(KLASS, OO){ OO.addMember("initialize",function (fs, inDir, outDir, recursive) { this.recursive = recursive; @@ -1272,7 +1269,6 @@ JS2.Class.extend('Updater', function(KLASS, OO){ }); }); - JS2.Class.extend('Config', function(KLASS, OO){ OO.addMember("CLI_REGEX",/^-(r|i|f|n|v|m)(=(\w+))?$/); OO.addMember("optsLookup",{ @@ -1344,7 +1340,6 @@ JS2.Class.extend('Config', function(KLASS, OO){ }); - JS2.Class.extend('Commander', function(KLASS, OO){ OO.addMember("BANNER","js2 [options] \n" + "VERSION: " + JS2.VERSION + "\n" + @@ -1431,7 +1426,6 @@ JS2.Class.extend('Commander', function(KLASS, OO){ }); - JS2.Class.extend('BrowserDecorator', function(KLASS, OO){ OO.addMember("file",function (code) { return code; @@ -1476,7 +1470,6 @@ JS2.Class.extend('RingoDecorator', function(KLASS, OO){ JS2.DECORATOR = JS2.DECORATOR || new JS2.BrowserDecorator(); - JS2.Class.extend('JSML', function(KLASS, OO){ OO.addStaticMember("process",function (txt) { return new KLASS(txt); @@ -1562,11 +1555,9 @@ JS2.Class.extend('JSMLElement', function(KLASS, OO){ return ''; }); }); - }); - JS2.Class.extend('NodeFileAdapter', function(KLASS, OO){ OO.addMember("initialize",function () { this.fs = require('fs'); @@ -1618,7 +1609,6 @@ JS2.Class.extend('JSMLElement', function(KLASS, OO){ }); }); - JS2.fs = new JS2.FileSystem(new JS2.NodeFileAdapter()); js2.DECORATOR = new JS2.NodeDecorator(); diff --git a/flavors/node.package.json b/flavors/node.package.json index aa9a387..0fa7027 100644 --- a/flavors/node.package.json +++ b/flavors/node.package.json @@ -1,6 +1,6 @@ { "name" : "js2", "description" : "Javascript Syntactic Sugar", - "version" : "0.3.11", + "version" : "0.3.12", "author" : "Jeff Su", "repository" : { "type" : "git" , "url" : "git://github.com/jeffsu/js2.git" }, "bugs" : { "web" : "http://github.com/jeffsu/js2/issues" }, diff --git a/flavors/ringo-full.js b/flavors/ringo-full.js index 9b0f0b6..c12cf4e 100644 --- a/flavors/ringo-full.js +++ b/flavors/ringo-full.js @@ -16,7 +16,7 @@ function mainFunction (arg) { var JS2 = root.JS2 = mainFunction; var js2 = root.js2 = JS2; - js2.VERSION = "0.3.11"; + js2.VERSION = "0.3.12"; JS2.ROOT = JS2; @@ -842,7 +842,6 @@ function mainFunction (arg) { }, toString: function () { - console.log((new Validator(this.content)).getString()); var v = this.validate(/^(function)(\s+)(I)(\s*)(Braces)(\s*)(Block)/); return 'OO.addMember("' + v[3] + '",' + "function" + v[2] + v[5] + ' ' + v[7] + ');'; } @@ -1118,7 +1117,6 @@ JS2.Array.prototype.any = function() { return this.length > 0; }; - JS2.Class.extend('FileSystem', function(KLASS, OO){ OO.addMember("initialize",function (adapter) { this.adapter = adapter; @@ -1228,7 +1226,6 @@ JS2.Class.extend('FileSystem', function(KLASS, OO){ }); }); - JS2.Class.extend('Updater', function(KLASS, OO){ OO.addMember("initialize",function (fs, inDir, outDir, recursive) { this.recursive = recursive; @@ -1274,7 +1271,6 @@ JS2.Class.extend('Updater', function(KLASS, OO){ }); }); - JS2.Class.extend('Config', function(KLASS, OO){ OO.addMember("CLI_REGEX",/^-(r|i|f|n|v|m)(=(\w+))?$/); OO.addMember("optsLookup",{ @@ -1346,7 +1342,6 @@ JS2.Class.extend('Config', function(KLASS, OO){ }); - JS2.Class.extend('Commander', function(KLASS, OO){ OO.addMember("BANNER","js2 [options] \n" + "VERSION: " + JS2.VERSION + "\n" + @@ -1433,7 +1428,6 @@ JS2.Class.extend('Commander', function(KLASS, OO){ }); - JS2.Class.extend('BrowserDecorator', function(KLASS, OO){ OO.addMember("file",function (code) { return code; @@ -1478,7 +1472,6 @@ JS2.Class.extend('RingoDecorator', function(KLASS, OO){ JS2.DECORATOR = JS2.DECORATOR || new JS2.BrowserDecorator(); - JS2.Class.extend('JSML', function(KLASS, OO){ OO.addStaticMember("process",function (txt) { return new KLASS(txt); @@ -1564,11 +1557,9 @@ JS2.Class.extend('JSMLElement', function(KLASS, OO){ return ''; }); }); - }); - JS2.Class.extend('RingoFileAdapter', function(KLASS, OO){ OO.addMember("initialize",function () { this.fs = require('fs'); @@ -1621,7 +1612,6 @@ JS2.Class.extend('JSMLElement', function(KLASS, OO){ }); }); - JS2.fs = new FileSystem(new RingoFileAdapter()); JS2.DECORATOR = new JS2.RingoDecorator(); diff --git a/flavors/ringo.js b/flavors/ringo.js index f117b4a..ab2b622 100644 --- a/flavors/ringo.js +++ b/flavors/ringo.js @@ -18,7 +18,7 @@ function mainFunction (arg) { var JS2 = root.JS2 = mainFunction; var js2 = root.js2 = JS2; js2.ROOT = JS2; - js2.VERSION = "0.3.11"; + js2.VERSION = "0.3.12"; // CLASS HELPERS @@ -267,7 +267,6 @@ JS2.Array.prototype.any = function() { }; - js2.ROOT = root; return js2; })(this); diff --git a/flavors/ringo.package.json b/flavors/ringo.package.json index 29c53da..f86da2d 100644 --- a/flavors/ringo.package.json +++ b/flavors/ringo.package.json @@ -1,6 +1,6 @@ { "name": "js2-ringo", - "version": "0.3.11", + "version": "0.3.12", "description": "Javascript Syntactic Sugar", "keywords": ["rhino", "ringo", "js2", "object oriented programming" ], "author": "Jeff Su (http://jeffsu.com/) ", diff --git a/flavors/ruby.js b/flavors/ruby.js index 38139fe..cd9fbbf 100644 --- a/flavors/ruby.js +++ b/flavors/ruby.js @@ -14,7 +14,7 @@ function mainFunction (arg) { var JS2 = root.JS2 = mainFunction; var js2 = root.js2 = JS2; - js2.VERSION = "0.3.11"; + js2.VERSION = "0.3.12"; JS2.ROOT = JS2; @@ -840,7 +840,6 @@ function mainFunction (arg) { }, toString: function () { - console.log((new Validator(this.content)).getString()); var v = this.validate(/^(function)(\s+)(I)(\s*)(Braces)(\s*)(Block)/); return 'OO.addMember("' + v[3] + '",' + "function" + v[2] + v[5] + ' ' + v[7] + ');'; } @@ -1116,7 +1115,6 @@ JS2.Array.prototype.any = function() { return this.length > 0; }; - JS2.Class.extend('FileSystem', function(KLASS, OO){ OO.addMember("initialize",function (adapter) { this.adapter = adapter; @@ -1226,7 +1224,6 @@ JS2.Class.extend('FileSystem', function(KLASS, OO){ }); }); - JS2.Class.extend('Updater', function(KLASS, OO){ OO.addMember("initialize",function (fs, inDir, outDir, recursive) { this.recursive = recursive; @@ -1272,7 +1269,6 @@ JS2.Class.extend('Updater', function(KLASS, OO){ }); }); - JS2.Class.extend('Config', function(KLASS, OO){ OO.addMember("CLI_REGEX",/^-(r|i|f|n|v|m)(=(\w+))?$/); OO.addMember("optsLookup",{ @@ -1344,7 +1340,6 @@ JS2.Class.extend('Config', function(KLASS, OO){ }); - JS2.Class.extend('Commander', function(KLASS, OO){ OO.addMember("BANNER","js2 [options] \n" + "VERSION: " + JS2.VERSION + "\n" + @@ -1431,7 +1426,6 @@ JS2.Class.extend('Commander', function(KLASS, OO){ }); - JS2.Class.extend('BrowserDecorator', function(KLASS, OO){ OO.addMember("file",function (code) { return code; @@ -1476,7 +1470,6 @@ JS2.Class.extend('RingoDecorator', function(KLASS, OO){ JS2.DECORATOR = JS2.DECORATOR || new JS2.BrowserDecorator(); - JS2.Class.extend('JSML', function(KLASS, OO){ OO.addStaticMember("process",function (txt) { return new KLASS(txt); @@ -1562,11 +1555,9 @@ JS2.Class.extend('JSMLElement', function(KLASS, OO){ return ''; }); }); - }); - JS2.fs = new JS2.FileSystem(JS2_RUBY_FILE_ADAPTER); js2.DECORATOR = new JS2.BrowserDecorator(); js2.ROOT = root; diff --git a/src/Common/JSML.js2 b/src/Common/JSML.js2 index 4e82e74..2ad6d8d 100644 --- a/src/Common/JSML.js2 +++ b/src/Common/JSML.js2 @@ -66,7 +66,7 @@ class JSMLElement { function parse(line) { var self = this; - line = line.replace(this.TOKEN_REGEX, #(match, type, name) { + line = line.replace(this.TOKEN_REGEX, #(match, type, name){ switch(type) { case '%': this.nodeType = name; break; case '#': this.classes.push(name); break; @@ -75,7 +75,7 @@ class JSMLElement { return ''; }); - line = line.replace(this.JS_OUT_REGEX, #(match, type, content) { + line = line.replace(this.JS_OUT_REGEX, #(match, type, content){ switch(type) { case '=': this.jsEQ = content; break; case '-': this.jsExec = content; break; @@ -83,5 +83,4 @@ class JSMLElement { return ''; }); } - }