!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/local/share/.cache/yarn/v6/npm-tailwindcss-2.2.17-integrity/node_modules/tailwindcss/scripts/   drwxr-xr-x
Free 13.03 GB of 57.97 GB (22.48%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     compat.js (2.35 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
let fs = require('fs')
let path = require('path')
let merge = require('lodash/merge')
let fastGlob = require('fast-glob')

let postcss7 = fastGlob.sync(['./**/*.postcss7.*']).filter((file) => !file.startsWith('lib/'))
let postcss8 = fastGlob.sync(['./**/*.postcss8.*']).filter((file) => !file.startsWith('lib/'))

if (process.argv.includes('--prepare')) {
  if (postcss8.length > 0) {
    console.error('\n\n[ABORT] Already in PostCSS 7 compatibility mode!\n\n')
    process.exit(1)
  }

  let mainPackageJson = require('../package.json')
  let compatPackageJson = require('../package.postcss7.json')

  // Use postcss7 files
  for (let file of postcss7) {
    let bareFile = file.replace('.postcss7', '')
    let postcss8File = file.replace('.postcss7', '.postcss8')

    // Backup
    copy(fromRootPath(bareFile), fromRootPath(postcss8File))

    // Swap
    copy(fromRootPath(file), fromRootPath(bareFile))
  }

  // Deep merge package.json contents
  let packageJson = merge({}, mainPackageJson, compatPackageJson)

  // Remove peerDependencies
  delete packageJson.peerDependencies

  // Cleanup devDependencies
  for (let key in packageJson.devDependencies) {
    if (key.includes('postcss')) delete packageJson.devDependencies[key]
  }

  // Use new name
  packageJson.name = '@tailwindcss/postcss7-compat'

  // Make sure you can publish
  packageJson.publishConfig = { access: 'public' }

  // Write package.json with the new contents
  fs.writeFileSync(fromRootPath('package.json'), JSON.stringify(packageJson, null, 2), 'utf8')

  // Print some useful information to make publishing easy
  console.log()
  console.log('You can safely publish `tailwindcss` in PostCSS 7 compatibility mode:\n')
  console.log()
} else if (process.argv.includes('--restore')) {
  if (postcss8.length === 0) {
    console.error('\n\n[ABORT] Already in latest PostCSS mode!\n\n')
    process.exit(1)
  }

  // Use postcss8 files
  for (let file of postcss8) {
    let bareFile = file.replace('.postcss8', '')

    // Restore
    copy(fromRootPath(file), fromRootPath(bareFile))

    // Remove
    fs.unlinkSync(fromRootPath(file))
  }

  // Done
  console.log()
  console.log('Restored from PostCSS 7 mode to latest PostCSS mode!')
  console.log()
}

// ---

function fromRootPath(...paths) {
  return path.resolve(process.cwd(), ...paths)
}

function copy(fromPath, toPath) {
  fs.copyFileSync(fromPath, toPath)
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0065 ]--