Skip to content
Browse files

Removed embedded library dependencies.

  • Loading branch information...
1 parent ff6dd94 commit b03294e00979b46096841bd0e3ccb717bcfea0bd @jbeard4 committed Nov 7, 2012
View
9 .gitmodules
@@ -1,9 +0,0 @@
-[submodule "test/scxml-test-framework"]
- path = test/scxml-test-framework
- url = git://github.com/jbeard4/scxml-test-framework.git
-[submodule "lib/external/xmldom"]
- path = lib/external/xmldom
- url = git://github.com/jbeard4/xmldom.git
-[submodule "lib/external/jsUri"]
- path = lib/external/jsUri
- url = git://github.com/jbeard4/jsUri.git
View
0 lib/embedded/dom.js → lib/base-platform/dom.js
File renamed without changes.
View
0 lib/embedded/path.js → lib/base-platform/path.js
File renamed without changes.
View
2 lib/browser/dom.js
@@ -16,7 +16,7 @@
"use strict";
-var baseDom = require('../embedded/dom');
+var baseDom = require('../base-platform/dom');
function getItem(nodeList,index){
return "item" in nodeList ? nodeList.item(index) : nodeList[index];
View
11 lib/browser/platform.js
@@ -16,16 +16,16 @@
"use strict";
-var util = require('../core/util/util'),
- basePlatform = require('../embedded/platform').platform;
+var util = require('../core/util/util');
//browser mostly just inherits path from basePlatform
-exports.platform = util.merge(Object.create(basePlatform),{
+exports.platform = {
/** @expose */
ajax : window.jQuery, //this can be overridden
//used in parsing
+ eval : require('../base-platform/eval'),
/** @this {platform} */
getDocumentFromUrl : function(url,cb){
@@ -76,8 +76,9 @@ exports.platform = util.merge(Object.create(basePlatform),{
log : window.console.log.bind(console),
+ path : require('../base-platform/path'),
+
url : require('./url'),
dom : require('./dom')
-});
-
+};
View
44 lib/embedded/platform.js
@@ -1,44 +0,0 @@
-/*
- Copyright 2011-2012 Jacob Beard, INFICON, and other SCION contributors
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-"use strict";
-
-//this provides an incomplete base platform implementation
-//other platform implementations can optionally extend it.
-
-function parseDocumentFromString(str){
- var xmldom = require('../../external/xmldom/dom-parser');
- return (new xmldom.DOMParser()).parseFromString(str);
-}
-
-//most shells will also at least be able to implement: getDocumentFromFilesystem and log
-
-exports.platform = {
- parseDocumentFromString : parseDocumentFromString,
-
- eval : function(content,name){
- //JScript doesn't return functions from evaled function expression strings,
- //so we wrap it here in a trivial self-executing function which gets eval'd
- return eval('(function(){\nreturn ' + content + ';})()');
- },
-
- path : require('./path'),
-
- url : require('./url'),
-
- dom : require('./dom')
-
-};
View
39 lib/embedded/url.js
@@ -1,39 +0,0 @@
-/*
- Copyright 2011-2012 Jacob Beard, INFICON, and other SCION contributors
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-"use strict";
-
-//this base module could be used with jsuri [http://code.google.com/p/jsuri/], a portable, pure-js URI parser implemenation
-//currently, none of the "blessed" environments use it, but it could simplify things for embedding
-//assume global Uri object
-//require('external/jsUri/dist/jsuri'); //this is just to load up a global Uri object
-
-function parseUri(uri){
- /*jsl:ignore*/
- if(typeof Uri === undefined) throw new Error("URI parser not loaded");
- return new Uri(url);
- /*jsl:end*/
-}
-
-module.exports = {
- getPathFromUrl : function(url){
- return parseUri(url).path();
- },
-
- changeUrlPath : function(url,newPath){
- return parseUri(url).path(newPath).toString();
- }
-};
View
2 lib/node/dom.js
@@ -16,4 +16,4 @@
"use strict";
-module.exports = require('../embedded/dom'); //pass straight through. no modifications needed
+module.exports = require('../base-platform/dom'); //pass straight through. no modifications needed
View
2 lib/rhino/dom.js
@@ -16,7 +16,7 @@
"use strict";
-var baseDom = require('../embedded/dom');
+var baseDom = require('../base-platform/dom');
var dom = Object.create(baseDom);

0 comments on commit b03294e

Please sign in to comment.
Something went wrong with that request. Please try again.