From: Ben Beltran Date: Mon, 11 Aug 2014 23:28:59 +0000 (-0500) Subject: Prepare it for the browser X-Git-Tag: v0.1.3~3 X-Git-Url: https://git.r.bdr.sh/rbdr/serpentity/commitdiff_plain/f97380adc4933fa3bf65b84f010bd303c9dd28a2?hp=--cc Prepare it for the browser --- f97380adc4933fa3bf65b84f010bd303c9dd28a2 diff --git a/.gitignore b/.gitignore index da23d0d..e5a4385 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ build/Release # Deployed apps should consider commenting this line out: # see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git node_modules +bower_modules diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..985e6c8 --- /dev/null +++ b/bower.json @@ -0,0 +1,31 @@ +{ + "name": "serpentity", + "version": "0.1.3", + "homepage": "https://github.com/benbeltran/serpentity", + "authors": [ + "Ben Beltran " + ], + "description": "A simple entity framework inspired by ash", + "main": [ + "./lib/serpentity/serpentity.js", + "./lib/serpentity/entity.js", + "./lib/serpentity/node.js", + "./lib/serpentity/node_collection.js", + "./lib/serpentity/component.js", + "./lib/serpentity/system.js" + ], + "keywords": [ + "entity" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "neon": "*" + } +} diff --git a/browser_test/index.html b/browser_test/index.html new file mode 100644 index 0000000..9133ed5 --- /dev/null +++ b/browser_test/index.html @@ -0,0 +1,161 @@ + + + + Serpentity Browser Test + + + + + + + + + + +

404 Droids Not Found

+ Look in your console... + + diff --git a/lib/serpentity/serpentity.js b/lib/serpentity/serpentity.js index d86c47e..6d3920c 100644 --- a/lib/serpentity/serpentity.js +++ b/lib/serpentity/serpentity.js @@ -1,4 +1,6 @@ -require("neon"); +if (typeof require !== "undefined") { + require("neon"); +} /* Serpentity is a simple entity framework inspired by Ash. @@ -249,8 +251,10 @@ Class("Serpentity")({ } }); -require("./component.js"); -require("./entity.js"); -require("./node.js"); -require("./node_collection.js"); -require("./system.js"); +if (typeof require !== "undefined") { + require("./component.js"); + require("./entity.js"); + require("./node.js"); + require("./node_collection.js"); + require("./system.js"); +} diff --git a/package.json b/package.json index d546847..9b87907 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name" : "serpentity", - "description" : "A simple entity frameowrk inspired by ash", - "version" : "0.1.2", + "description" : "A simple entity framework inspired by ash", + "version" : "0.1.3", "contributors" : [ { "name" : "Ben Beltran",