One Hat Cyber Team
Your IP :
216.73.216.155
Server IP :
122.155.17.190
Server :
Linux cat17190.thaihostserver.com 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64
Server Software :
Apache/2
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
neunkho
/
public_html
/
hpp
/
build
/
npm
/
View File Name :
Publish.js
const Plugins = require('./Plugins') const fse = require('fs-extra') class Publish { constructor() { this.options = { verbose: false } this.getArguments() } getArguments() { if (process.argv.length > 2) { let arg = process.argv[2] switch (arg) { case '-v': case '--verbose': this.options.verbose = true break default: throw new Error(`Unknown option ${arg}`) } } } run() { // Publish files Plugins.forEach((module) => { try { if (fse.existsSync(module.from)) { fse.copySync(module.from, module.to) } else { fse.copySync(module.from.replace('node_modules/', '../'), module.to) } if (this.options.verbose) { console.log(`Copied ${module.from} to ${module.to}`) } } catch (err) { console.error(`Error: ${err}`) } }) } } (new Publish()).run()