Skip to content

Commit 441f81a

Browse files
authored
Update hacker-library.js
1 parent bb23143 commit 441f81a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

hacker-library/hacker-library.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
// hacker-library.js - Enhanced library manager in JavaScript.
2-
// Supports list (shows available libs), install (simulates download), update (simulates update check).
3-
// Uses node-fetch for HTTP requests.
4-
// Place in ~/.hackeros/hacker-lang/bin/hacker-library.js with shebang #!/usr/bin/env node.
1+
#!/usr/bin/env node
2+
3+
// hacker-library.js - Library manager for Hacker Lang.
4+
// Located at ~/.hacker-lang/bin/hacker-library.
5+
// Handles install (downloads libraries), update (checks updates), list (shows available/installed).
56

67
const fs = require('fs');
78
const path = require('path');
@@ -10,7 +11,7 @@ const fetch = require('node-fetch');
1011
const args = process.argv.slice(2);
1112
const action = args[0];
1213

13-
const libDir = path.join(process.env.HOME, '.hackeros', 'hacker-lang', 'libs');
14+
const libDir = path.join(process.env.HOME, '.hacker-lang', 'libs');
1415

1516
if (!fs.existsSync(libDir)) {
1617
fs.mkdirSync(libDir, { recursive: true });
@@ -34,7 +35,7 @@ if (action === 'list') {
3435
console.error(`Library ${libname} not found. Available: ${availableLibs.join(', ')}`);
3536
process.exit(1);
3637
}
37-
const url = `https://example.com/hacker-lang/${libname}.hacker`; // Placeholder
38+
const url = `https://example.com/hacker-lang/${libname}.hacker`; // Placeholder
3839
const filePath = path.join(libDir, `${libname}.hacker`);
3940
console.log(`Installing ${libname} to ${filePath}...`);
4041
fetch(url)

0 commit comments

Comments
 (0)