Server IP : 2a02:4780:11:1361:0:bf7:7935:10 / Your IP : 18.191.162.123 Web Server : LiteSpeed System : Linux in-mum-web1261.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64 User : u200767797 ( 200767797) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : ON Directory (0755) : /home/u200767797/domains/drusonpharma.com/public_html/assets/../admin/scripts/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
'use strict'; const autoprefixer = require('autoprefixer') const fs = require('fs'); const packageJSON = require('../package.json'); const upath = require('upath'); const postcss = require('postcss') const sass = require('sass'); const sh = require('shelljs'); const stylesPath = '../src/scss/styles.scss'; const destPath = upath.resolve(upath.dirname(__filename), '../dist/css/styles.css'); module.exports = function renderSCSS() { const results = sass.renderSync({ data: entryPoint, includePaths: [ upath.resolve(upath.dirname(__filename), '../node_modules') ], }); const destPathDirname = upath.dirname(destPath); if (!sh.test('-e', destPathDirname)) { sh.mkdir('-p', destPathDirname); } postcss([ autoprefixer ]).process(results.css, {from: 'styles.css', to: 'styles.css'}).then(result => { result.warnings().forEach(warn => { console.warn(warn.toString()) }) fs.writeFileSync(destPath, result.css.toString()); }) }; const entryPoint = `/*! * Start Bootstrap - ${packageJSON.title} v${packageJSON.version} (${packageJSON.homepage}) * Copyright 2013-${new Date().getFullYear()} ${packageJSON.author} * Licensed under ${packageJSON.license} (https://github.com/StartBootstrap/${packageJSON.name}/blob/master/LICENSE) */ @import "${stylesPath}" `