From 40bf54b3fc2468e65ba3a5d559b706b28da136d9 Mon Sep 17 00:00:00 2001 From: zhiyan Date: Fri, 8 Jun 2018 15:37:29 +0800 Subject: [PATCH] Fixes #20, #5 --- bin/index.js | 10 ++++++++++ package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 bin/index.js diff --git a/bin/index.js b/bin/index.js new file mode 100644 index 0000000..fc202d9 --- /dev/null +++ b/bin/index.js @@ -0,0 +1,10 @@ +#!/usr/bin/env node +const path = require('path') +const fork = require('child_process').fork +const argv = process.argv.slice(2) + +fork(path.resolve(__dirname, '../src/index.js'), argv, { + env: { + NODE_NO_WARNINGS: 1 + } +}) diff --git a/package.json b/package.json index 25adf90..bf2f2dc 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "authors": "git log --format='%aN <%aE>' | sort -u" }, "bin": { - "hiper": "./src/index.js" + "hiper": "./bin/index.js" }, "license": "MIT", "dependencies": {