Skip to content

Commit

Permalink
v1
Browse files Browse the repository at this point in the history
  • Loading branch information
RnbWd committed May 14, 2016
1 parent 1a6be35 commit 08a9f31
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env node
'use strict';
var spawn = require('child_process').spawn;
var input = process.argv.slice(2);
var bin = require('./');

spawn(bin, input, {stdio: 'inherit'})
.on('exit', process.exit);
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'use strict';
var bin = require('./lib');
module.exports = bin.path();
7 changes: 7 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var BinWrapper = require('bin-wrapper');
var path = require('path');
var base = 'https://github.com/matthieudelaro/nut/raw/manualbuild/release/nutOSX'

module.exports = new BinWrapper()
.src(base, 'darwin')
.dest(path.join('../')).use('nutOSX').version('0.1.0');
12 changes: 12 additions & 0 deletions lib/install.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict';
var log = require('logalot');
var bin = require('./');

bin.run(['--version'], function (err) {
if (err) {
log.error(err.message);
log.error('vault binary test failed');
return;
}
log.success('vault binary test passed successfully');
});
23 changes: 23 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "nut-bin",
"version": "0.1.0",
"description": "",
"bin": {
"nut": "cli.js"
},
"files": [
"index.js",
"cli.js",
"lib"
],
"scripts": {
"postinstall": "node lib/install.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"bin-wrapper": "^3.0.2",
"logalot": "^2.1.0"
}
}

0 comments on commit 08a9f31

Please sign in to comment.