Skip to content

Commit

Permalink
added linux and README
Browse files Browse the repository at this point in the history
  • Loading branch information
RnbWd committed May 16, 2016
1 parent 04d792b commit a6eb82a
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 18 deletions.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
# nut-bin
# nut-bin

> Binary wrapper for [nut](https://matthieudelaro.github.io/nut/) - docker cli tool
## How to install

$ npm install -g nut-bin

## Nut
**Nut** is a command line tool which offers a solution to common frustrations of developers. It hides the complexity of development environments, and extends them with customizable macros. Whether you develop in Swift, Go, Java, or C++, what you need is build/run/test the app. So just do it:

$ nut --init # create nut.yml file (equivalent of package.json for npm)
$ nut build
$ nut run
$ nut test

**Nut** mounts the current folder in a [Docker](https://www.docker.com/) container, and executes commands on your behalf, according to the project configuration. The configuration is read from `nut.yml` file, in the current folder. You can choose the Docker image to use, declare volumes to mount, and define commands (called macros) such as *build*, *run*, and *test*.

Nut is in early stage of development. It has been tested on Ubuntu and on MacOS with *Docker for Mac*. Feedbacks and contributions to add features and to make Nut run on other systems are welcome (Windows, Docker Toolbox, etc).

Check the [wiki](https://github.com/matthieudelaro/nut/wiki) to read some tutorials (GPU support, Caffe, TensorFlow, etc).

Full documentation can found in the main repository - https://github.com/matthieudelaro/nut

MIT
10 changes: 7 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
var BinWrapper = require('bin-wrapper');
var path = require('path');
var base = 'https://github.com/matthieudelaro/nut/raw/manualbuild/release/nutOSX'
var BASE = 'https://github.com/matthieudelaro/nut/raw/manualbuild/release/'

module.exports = new BinWrapper()
.src(base, 'darwin')
.dest(path.join('../release')).use('nutOSX').version('0.1.0');
.src(BASE + 'nutOSX', 'darwin')
.src(BASE + 'nutLinux', 'linux', 'x64')
// .src(BASE + 'Windows', 'win32', 'x64')
.dest(path.join(__dirname, '../vendor'))
.use((process.platform === 'linux' ? 'nutLinux' : 'nutOSX'))
.version('0.1.0');
4 changes: 2 additions & 2 deletions lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ var bin = require('./');
bin.run(['--version'], function (err) {
if (err) {
log.error(err.message);
log.error('vault binary test failed');
log.error('nut binary test failed');
return;
}
log.success('vault binary test passed successfully');
log.success('nut binary test passed successfully');
});
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,21 @@
"lib"
],
"scripts": {
"test": "npm run postinstall && ava",
"postinstall": "node lib/install.js"
},
"author": "",
"author": {
"name": "David Wisner",
"email": "[email protected]",
"url": "rnbwd.com"
},
"license": "ISC",
"dependencies": {
"bin-wrapper": "^3.0.2",
"logalot": "^2.1.0"
},
"devDependencies": {
"ava": "*",
"bin-check": "^3.0.0"
}
}
16 changes: 5 additions & 11 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
'use strict';
var test = require('ava');
var binCheck = require('bin-check');
var nut = require('./cli.js');
import test from 'ava';
import binCheck from 'bin-check';
import flow from './';

test('return path to binary and verify that it is working', function (t) {
t.plan(2);

binCheck(nut, ['--version'], function (err, stdout) {
t.assert(!err, err);
t.assert(stdout);
});
test('returns path to binary and verify that it is working', async t => {
t.true(await binCheck(flow, ['--version']));
});
Binary file added vendor/nutOSX
Binary file not shown.

0 comments on commit a6eb82a

Please sign in to comment.