Permalink
Please sign in to comment.
Showing
with
72 additions
and 1 deletion.
- +6 −1 README.md
- +3 −0 test/nw/.gitignore
- +40 −0 test/nw/Makefile
- +14 −0 test/nw/index.html
- +9 −0 test/nw/package.json
| @@ -0,0 +1,3 @@ | ||
| +node-webkit.app | ||
| +node-webkit-v0.8.4-osx-ia32.zip | ||
| +node_modules |
| @@ -0,0 +1,40 @@ | ||
| +NODE_WEBKIT_VERSION=0.8.4 | ||
| + | ||
| +all: app.nw | ||
| + | ||
| +node_modules/sqlite3: | ||
| + npm install https://github.com/mapbox/node-sqlite3/tarball/master | ||
| + | ||
| +node_modules/sqlite3/lib/node_sqlite3.node: node_modules/sqlite3 | ||
| + cd node_modules/sqlite3 && nw-gyp rebuild --target=$(NODE_WEBKIT_VERSION) && rm -rf build/ | ||
| + | ||
| +node-webkit-v$(NODE_WEBKIT_VERSION)-osx-ia32.zip: | ||
| + wget https://s3.amazonaws.com/node-webkit/v$(NODE_WEBKIT_VERSION)/node-webkit-v$(NODE_WEBKIT_VERSION)-osx-ia32.zip | ||
| + | ||
| +./node-webkit.app: node-webkit-v$(NODE_WEBKIT_VERSION)-osx-ia32.zip | ||
| + unzip -o node-webkit-v$(NODE_WEBKIT_VERSION)-osx-ia32.zip | ||
| + | ||
| +app.nw: ./node-webkit.app Makefile package.json index.html node_modules/sqlite3/lib/node_sqlite3.node | ||
| + zip app.nw index.html package.json node_modules | ||
| + | ||
| +test: ./node-webkit.app app.nw | ||
| + ./node-webkit.app/Contents/MacOS/node-webkit app.nw | ||
| + | ||
| +package: ./node-webkit.app Makefile package.json index.html node_modules/sqlite3 | ||
| + rm -rf node-sqlite-test.app | ||
| + cp -r ./node-webkit.app node-sqlite-test.app | ||
| + mkdir ./node-sqlite-test.app/Contents/Resources/app.nw/ | ||
| + cp package.json ./node-sqlite-test.app/Contents/Resources/app.nw/ | ||
| + cp index.html ./node-sqlite-test.app/Contents/Resources/app.nw/ | ||
| + cp -r node_modules/ ./node-sqlite-test.app/Contents/Resources/app.nw/ | ||
| + ./node-sqlite-test.app/Contents/MacOS/node-webkit | ||
| + | ||
| +clean: | ||
| + rm -rf ./node_modules/sqlite3/build | ||
| + rm -f ./node_modules/sqlite3/lib/node_sqlite3.node | ||
| + rm -f ./app.nw | ||
| + rm -rf node-sqlite-test.app | ||
| + rm -f credits.html | ||
| + rm -f nwsnapshot | ||
| + | ||
| +.PHONY: test |
| @@ -0,0 +1,14 @@ | ||
| +<!DOCTYPE html> | ||
| +<html> | ||
| + <head> | ||
| + <title>Hello World!</title> | ||
| + </head> | ||
| + <body> | ||
| + <h1>Hello World!</h1> | ||
| + Using node-sqlite3: | ||
| + <script> | ||
| + var sqlite = require('sqlite3'); | ||
| + document.write(sqlite.VERSION); | ||
| + </script>. | ||
| + </body> | ||
| +</html> |
| @@ -0,0 +1,9 @@ | ||
| +{ | ||
| + "name": "nw-demo", | ||
| + "main": "index.html", | ||
| + "window": { | ||
| + "toolbar": false, | ||
| + "width": 800, | ||
| + "height": 600 | ||
| + } | ||
| +} |
0 comments on commit
61ac26a