Skip to content

Commit

Permalink
Add package.json for use with NPM
Browse files Browse the repository at this point in the history
Check for window global in UMD so Sketch works with browserify

Remove ugly exit code 1 from test command

Package as NPM module - soulwire#69
  • Loading branch information
JasonStorey committed Apr 28, 2015
1 parent 33cac83 commit 220886d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
3 changes: 2 additions & 1 deletion js/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
root.Sketch = factory( root, root.document );
}

}( this, function ( window, document ) {
}( typeof window !== "undefined" ? window : this, function ( window, document ) {


"use strict";

Expand Down
2 changes: 1 addition & 1 deletion js/sketch.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "sketch-js",
"version": "1.1.0",
"description": "Cross-Platform JavaScript Creative Coding Framework",
"main": "./js/sketch.js",
"directories": {
"example": "examples",
"test": "tests",
"lib": "js"
},
"scripts": {
"test": "echo \"visit ./tests/index.html in browser\""
},
"repository": {
"type": "git",
"url": "https://github.com/soulwire/sketch.js.git"
},
"author": {
"name": "Justin Windle",
"url": "https://github.com/soulwire"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/soulwire/sketch.js/issues"
},
"homepage": "https://github.com/soulwire/sketch.js",
"keywords": [
"sketch",
"canvas",
"webgl",
"2d",
"javascript"
]
}

0 comments on commit 220886d

Please sign in to comment.