Skip to content

Commit

Permalink
Add bin/bare
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperisager committed May 24, 2024
1 parent 50dd666 commit fe9f6f1
Show file tree
Hide file tree
Showing 3 changed files with 209 additions and 3 deletions.
13 changes: 13 additions & 0 deletions npm/bin/bare
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env node
const fs = require('fs')
const bin = require('bare-runtime')(__filename)
try {
fs.accessSync(bin, fs.constants.X_OK)
} catch {
fs.chmodSync(bin, 0o755)
}
try {
require('child_process').execFileSync(bin, process.argv.slice(2), { stdio: 'inherit' })
} catch (err) {
process.exitCode = err.status || 1
}
186 changes: 186 additions & 0 deletions npm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions npm/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
{
"name": "bare",
"version": "1.2.0",
"version": "1.2.2",
"description": "Small and modular JavaScript runtime for desktop and mobile",
"exports": {
".": {
"require": "./index.cjs",
"import": "./index.mjs"
}
},
"bin": {
"bare": "bin/bare"
},
"files": [
"index.cjs",
"index.mjs"
"index.mjs",
"bin"
],
"repository": {
"type": "git",
Expand All @@ -21,5 +25,8 @@
"bugs": {
"url": "https://github.com/holepunchto/bare/issues"
},
"homepage": "https://github.com/holepunchto/bare"
"homepage": "https://github.com/holepunchto/bare",
"dependencies": {
"bare-runtime": "1.2.2"
}
}

0 comments on commit fe9f6f1

Please sign in to comment.