403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/framework7/build/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/framework7/build/build-cordova.js
const rollup = require('rollup');
const fs = require('fs');
const path = require('path');

const build = async () => {
  // rebuild JS without modules
  let entry = fs
    .readdirSync(path.resolve(__dirname, '../cordova/www/assets'))
    .filter((f) => f.includes('index-') && f.includes('.js'))[0];
  const hash = entry.split('index-')[1].split('.js')[0];

  const bundle = await rollup.rollup({
    input: path.resolve(__dirname, '../cordova/www/assets/', entry),
  });
  await bundle.write({
    file: path.resolve(__dirname, '../cordova/www/assets/', `index-${hash}.js`),
    format: 'iife',
    name: 'MyApp',
    sourcemap: false,
  });

  // Remove old chunk files
  fs.readdirSync(path.resolve(__dirname, '../cordova/www/assets')).forEach((f) => {
    if (f.includes('.js') && f.split('.').length > 2 && f !== `index-${hash}.js`) {
      fs.rmSync(path.resolve(__dirname, '../cordova/www/assets', f));
    }
  });

  // fix index.html
  const indexPath = path.resolve(__dirname, '../cordova/www/index.html');
  const indexContent = fs
    .readFileSync(indexPath, 'utf8')
    .split('\n')
    .map((line) => {
      if (line.includes('<link rel="modulepreload"')) return '';
      if (line.includes('<script type="module"')) return '';
      if (line.includes('</body>'))
        return `  <script src="assets/index-${hash}.js"></script>\n</body>`;
      return line;
    })
    .join('\n');
  fs.writeFileSync(indexPath, indexContent);
};

build();

Youez - 2016 - github.com/yon3zu
LinuXploit