-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yunxing Dai
committed
Sep 2, 2016
0 parents
commit 8c7ee50
Showing
6 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env node | ||
/** | ||
* Copyright (c) 2015-present, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
*/ | ||
'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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* Copyright (c) 2015-present, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
*/ | ||
'use strict'; | ||
var bin = require('./lib'); | ||
|
||
module.exports = bin.path(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Copyright (c) 2015-present, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
*/ | ||
'use strict'; | ||
var path = require('path'); | ||
var BinWrapper = require('bin-wrapper'); | ||
|
||
var VERSION = '0.0.0'; | ||
var URL = 'https://github.com/npm-opam/utop-bin/releases/download/'; | ||
var BASE = URL + VERSION + '/'; | ||
|
||
module.exports = new BinWrapper() | ||
.src(BASE + 'utop-osx-v' + VERSION + '.zip', 'darwin') | ||
.src(BASE + 'utop-linux64-v' + VERSION + '.zip', 'linux', 'x64') | ||
.dest(path.join(__dirname, '../vendor')) | ||
.use('utop'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Copyright (c) 2015-present, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
*/ | ||
'use strict'; | ||
var log = require('logalot'); | ||
var bin = require('./'); | ||
|
||
bin.run(['--version'], function (err) { | ||
if (err) { | ||
log.error(err.message); | ||
log.error('utop binary test failed'); | ||
return; | ||
} | ||
|
||
log.success('utop binary test passed successfully'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "utop-installer-bin", | ||
"version": "0.0.0", | ||
"description": "bin wrapper for utop", | ||
"license": "MIT", | ||
"bin": { | ||
"utop": "cli.js" | ||
}, | ||
"scripts": { | ||
"postinstall": "node lib/install.js" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"cli.js", | ||
"lib" | ||
], | ||
"dependencies": { | ||
"bin-wrapper": "^3.0.2", | ||
"logalot": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"bin-check": "^3.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# utop-bin | ||
|
||
> Binary wrapper for utop | ||
OS X, Linux (64-bit) binaries are currently [provided] |