Uname : Linux premium36.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Soft : LiteSpeed
Ip : 198.54.115.237
Port : 443
~
/
opt
/
alt
/
alt-nodejs16
/
root
/
lib
/
node_modules
/
npm
/
node_modules
/
npm-packlist
/
bin
[ HOME ]
Exec
Submit
File Name : index.js
#!/opt/alt/alt-nodejs16/root/usr/bin/node 'use strict' const packlist = require('../') const dirs = [] let doSort = false process.argv.slice(2).forEach(arg => { if (arg === '-h' || arg === '--help') { console.log('usage: npm-packlist [-s --sort] [directory, directory, ...]') process.exit(0) } else if (arg === '-s' || arg === '--sort') { doSort = true } else { dirs.push(arg) } }) const sort = list => doSort ? list.sort((a, b) => a.localeCompare(b, 'en')) : list const main = async () => { if (!dirs.length) { const results = await packlist({ path: process.cwd() }) console.log(sort(results).join('\n')) } else { for (const dir of dirs) { console.group(`> ${dir}`) const results = await packlist({ path: dir }) console.log(sort(results).join('\n')) console.groupEnd() } } } // coverage disabled for catch handler because we don't need to test that main().catch(/* istanbul ignore next */(err) => { process.exitCode = 1 console.error(err.stack) })
Back
Folder Name
Submit
File Name
File Content
Submit
Name
Type
Size
Permission
Last Modified
Actions
.
dir
-
0755
2024-03-03 10:54:13
..
dir
-
0755
2024-03-03 10:54:13
index.js
text/plain
1 KB
0755
2023-11-03 02:15:01