Software: Apache. PHP/5.6.40-67+ubuntu20.04.1+deb.sury.org+1 uname -a: Linux hosting1.erectacloud.it 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC uid=5229(web473) gid=5117(client172) groups=5117(client172),5002(sshusers) Safe-mode: OFF (not secure) /var/www/clients/client172/web473/web/aps/xcrud/plugins/bootstrap-4.5.0/build/ drwxr-xr-x |
Viewing file: zip-examples.js (1.9 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | #!/usr/bin/env node /*! * Script to create the built examples zip archive; * requires the `zip` command to be present! * Copyright 2020 The Bootstrap Authors * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ 'use strict' const path = require('path') const sh = require('shelljs') const { version, version_short: versionShort } = require('../package.json') const folderName = `bootstrap-${version}-examples` sh.config.fatal = true if (!sh.test('-d', '_gh_pages')) { throw new Error('The "_gh_pages" folder does not exist, did you forget building the docs?') } // switch to the root dir sh.cd(path.join(__dirname, '..')) // remove any previously created folder with the same name sh.rm('-rf', folderName) // create any folders so that `cp` works sh.mkdir('-p', folderName) sh.mkdir('-p', `${folderName}/assets/brand/`) sh.cp('-Rf', `_gh_pages/docs/${versionShort}/examples/*`, folderName) sh.cp('-Rf', `_gh_pages/docs/${versionShort}/dist/`, `${folderName}/assets/`) // also copy the two brand images we use in the examples sh.cp('-f', [ `_gh_pages/docs/${versionShort}/assets/brand/bootstrap-outline.svg`, `_gh_pages/docs/${versionShort}/assets/brand/bootstrap-solid.svg` ], `${folderName}/assets/brand/`) sh.rm(`${folderName}/index.html`) // get all examples' HTML files sh.find(`${folderName}/**/*.html`).forEach((file) => { const fileContents = sh.cat(file) .toString() .replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../') .replace(/"..\/dist\//g, '"../assets/dist/') .replace(/(<link href="\.\.\/.*) integrity=".*>/g, '$1>') .replace(/(<script src="\.\.\/.*) integrity=".*>/g, '$1></script>') .replace(/( +)<!-- favicons(.|\n)+<style>/i, ' <style>') new sh.ShellString(fileContents).to(file) }) // create the zip file sh.exec(`zip -r9 "${folderName}.zip" "${folderName}"`, { fatal: true }) // remove the folder we created sh.rm('-rf', folderName) |
:: Command execute :: | |
--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0098 ]-- |