diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..b350e189 --- /dev/null +++ b/.npmignore @@ -0,0 +1,3 @@ +node_modules/ +test/ + diff --git a/misc/scripts/piskel-root b/misc/scripts/piskel-root new file mode 100644 index 00000000..26cd8ab4 --- /dev/null +++ b/misc/scripts/piskel-root @@ -0,0 +1,4 @@ +#!/usr/bin/env node +// Writes the absolute path to the release build root to stdout +var path = require('path'); +process.stdout.write(path.resolve(__dirname, '../../dest/prod') + '\n'); diff --git a/package.json b/package.json index 51e139f3..768590e1 100644 --- a/package.json +++ b/package.json @@ -6,16 +6,25 @@ "contributors": [ "Vincent Renaudin" ], - "main": "./dest/prod/index.html", "homepage": "http://github.com/juliandescottes/piskel", "license": "Apache-2.0", "repository": { "type": "git", "url": "http://github.com/juliandescottes/piskel.git" }, + "files": [ + "dest/prod", + "misc/scripts/piskel-root" + ], + "bin": { + "piskel-root": "./misc/scripts/piskel-root" + }, + "main": "./dest/prod/index.html", "scripts": { "test": "grunt test", - "start": "nodewebkit" + "start": "nodewebkit", + "preversion": "grunt test-local build", + "postversion": "git push && git push --tags && npm publish" }, "devDependencies": { "dateformat": "1.0.11",