Move Node.js specific things to dedicated folder.

This commit is contained in:
Jonathan Puckey 2011-08-20 15:48:57 +02:00
parent 70dc88ca91
commit 1f9993f894
2 changed files with 22 additions and 19 deletions

View file

@ -2,6 +2,8 @@ var fs = require('fs'),
vm = require('vm'), vm = require('vm'),
path = require('path'); path = require('path');
__dirname = path.resolve(__dirname, '../src/');
// Create the context within which we will run the source files: // Create the context within which we will run the source files:
var context = vm.createContext({ var context = vm.createContext({
options: { options: {
@ -27,6 +29,7 @@ var context = vm.createContext({
} }
}); });
// Load Paper.js library files:
context.include('paper.js'); context.include('paper.js');
context.Base.each(context, function(val, key) { context.Base.each(context, function(val, key) {

View file

@ -1,20 +1,20 @@
{ "name": "paper" {
, "description": "Vector graphics scripting framework" "name": "paper",
, "version": "0.2.1" "description": "Vector graphics scripting framework",
, "contributors": [ "version": "0.2.1",
{ "name" : "Jürg Lehni" "contributors": [{
, "url" : "http://lehni.org" "name" : "Jürg Lehni",
}, "url" : "http://lehni.org"
{ "name" : "Jonathan Puckey" }, {
, "url" : "http://jonathanpuckey.com" "name" : "Jonathan Puckey",
} "url" : "http://jonathanpuckey.com"
] }],
, "homepage": "http://paperjs.org" "homepage": "http://paperjs.org",
, "keywords": ["canvas", "graphic", "graphics", "vector", "paper.js"] "keywords": ["canvas", "graphic", "graphics", "vector", "paper.js"],
, "repository": "git://github.com/paperjs/paper.js/" "repository": "git://github.com/paperjs/paper.js/",
, "dependencies": { "dependencies": {
"canvas": "0.7.0" "canvas": "0.7.0"
} },
, "engines": { "node": ">= 0.4.0 && < 0.6.0" } "engines": { "node": ">= 0.4.0 && < 0.6.0" },
, "main": "./src/loadCanvas.js" "main": "./node.js/index.js"
} }