diff --git a/cli.js b/cli.js new file mode 100755 index 0000000..77aaaa8 --- /dev/null +++ b/cli.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./index')() diff --git a/index.js b/index.js old mode 100755 new mode 100644 index f2bb579..3c2d505 --- a/index.js +++ b/index.js @@ -1,4 +1,3 @@ -#!/usr/bin/env node var fs = require('fs') var path = require('path') var spawn = require('child_process').spawn @@ -212,4 +211,4 @@ function postinstallBuild () { }) } -postinstallBuild() +module.exports = postinstallBuild diff --git a/package.json b/package.json index 1b9765e..d284e48 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,11 @@ }, "main": "index.js", "bin": { - "postinstall-build": "index.js" + "postinstall-build": "cli.js" }, "files": [ - "index.js" + "index.js", + "cli.js" ], "scripts": { "build": "npm run build:docs",