Skip to content

Commit

Permalink
Separate CLI from package.json:main (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
exogen authored May 13, 2017
1 parent 1f1d4a1 commit 4977b43
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
require('./index')()
3 changes: 1 addition & 2 deletions index.js
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env node
var fs = require('fs')
var path = require('path')
var spawn = require('child_process').spawn
Expand Down Expand Up @@ -212,4 +211,4 @@ function postinstallBuild () {
})
}

postinstallBuild()
module.exports = postinstallBuild
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 4977b43

Please sign in to comment.