1
0
mirror of https://github.com/fuse-friends/fuse-native synced 2024-10-27 18:34:01 +00:00
This commit is contained in:
Mathias Buus 2019-12-17 10:15:33 +01:00
parent 65e819f84e
commit 3e5e9e8106
2 changed files with 23 additions and 0 deletions

20
bin.js Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env node
const Fuse = require('./')
const cmd = process.argv[2]
if (cmd === 'configure') {
Fuse.configure(onerror)
} else if (cmd === 'unconfigure') {
Fuse.unconfigure(onerror)
} else if (cmd === 'is-configured') {
Fuse.isConfigured(function (err, bool) {
if (err) return onerror(err)
console.log('' + bool)
process.exit(bool ? 0 : 1)
})
}
function onerror (err) {
if (err) throw err
}

View File

@ -3,6 +3,9 @@
"version": "0.0.0",
"description": "Fully maintained fuse bindings for Node that aims to cover the entire FUSE api",
"main": "index.js",
"bin": {
"fuse-native": "./bin.js"
},
"scripts": {
"install": "node-gyp-build",
"test": "tape test/*.js",