-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
31 lines (31 loc) · 1.63 KB
/
Copy pathpackage.json
File metadata and controls
31 lines (31 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"name": "hacker-docs",
"version": "1.0.0",
"description": "Hacker DOCS writeups",
"main": "server.js",
"scripts": {
"dev": "node server.js",
"start": "node server.js",
"build": "node -e \"const fs = require('fs'); const path = require('path'); const contentDir = 'content'; function getTree(dir, base = '') { let tree = []; if (!fs.existsSync(dir)) return []; const items = fs.readdirSync(dir, { withFileTypes: true }); items.forEach(item => { if (item.name.startsWith('.')) return; const relPath = path.posix.join(base, item.name); if (item.isDirectory()) { const children = getTree(path.join(dir, item.name), relPath); if (children.length > 0) tree.push({ name: item.name, path: relPath, type: 'directory', children }); } else if (item.name.endsWith('.md')) { tree.push({ name: item.name, path: relPath, type: 'file' }); } }); return tree.sort((a, b) => (a.type === b.type ? a.name.localeCompare(b.name) : a.type === 'directory' ? -1 : 1)); } const tree = getTree(contentDir); fs.writeFileSync('tree.json', JSON.stringify(tree, null, 2)); console.log('Generated tree.json');\"",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ghostware0x00/Hacker-DOCS.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "commonjs",
"bugs": {
"url": "https://github.com/SHROUDSOURAV/CTF-Writeups/issues"
},
"homepage": "https://github.com/SHROUDSOURAV/CTF-Writeups#readme",
"dependencies": {
"express": "^5.2.1",
"highlight.js": "^11.11.1",
"ignore": "^7.0.5",
"marked": "^18.0.2",
"marked-highlight": "^2.2.4"
}
}