diff --git a/src/loadNode.js b/node.js/index.js similarity index 95% rename from src/loadNode.js rename to node.js/index.js index fa2671d1..cc4c97db 100644 --- a/src/loadNode.js +++ b/node.js/index.js @@ -2,6 +2,8 @@ var fs = require('fs'), vm = require('vm'), path = require('path'); +__dirname = path.resolve(__dirname, '../src/'); + // Create the context within which we will run the source files: var context = vm.createContext({ options: { @@ -27,6 +29,7 @@ var context = vm.createContext({ } }); +// Load Paper.js library files: context.include('paper.js'); context.Base.each(context, function(val, key) { diff --git a/package.json b/package.json index 3ece2a14..1e2e4124 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,20 @@ -{ "name": "paper" - , "description": "Vector graphics scripting framework" - , "version": "0.2.1" - , "contributors": [ - { "name" : "Jürg Lehni" - , "url" : "http://lehni.org" - }, - { "name" : "Jonathan Puckey" - , "url" : "http://jonathanpuckey.com" - } - ] - , "homepage": "http://paperjs.org" - , "keywords": ["canvas", "graphic", "graphics", "vector", "paper.js"] - , "repository": "git://github.com/paperjs/paper.js/" - , "dependencies": { - "canvas": "0.7.0" - } - , "engines": { "node": ">= 0.4.0 && < 0.6.0" } - , "main": "./src/loadCanvas.js" +{ + "name": "paper", + "description": "Vector graphics scripting framework", + "version": "0.2.1", + "contributors": [{ + "name" : "Jürg Lehni", + "url" : "http://lehni.org" + }, { + "name" : "Jonathan Puckey", + "url" : "http://jonathanpuckey.com" + }], + "homepage": "http://paperjs.org", + "keywords": ["canvas", "graphic", "graphics", "vector", "paper.js"], + "repository": "git://github.com/paperjs/paper.js/", + "dependencies": { + "canvas": "0.7.0" + }, + "engines": { "node": ">= 0.4.0 && < 0.6.0" }, + "main": "./node.js/index.js" } \ No newline at end of file