Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
;(async _ => {
await fs.mkdir('dist')
const src = path.join('css', 'index.css')
postcss.transform(src, path.join('dist', 'index.css'), [
require('postcss-import'),
require('postcss-cssnext')({ browsers: ['Last 2 versions', 'IE >= 11'] }),
require('cssnano')
])
})()
const writeHtml = async (pageType, html) => {
const outputDir = path.join(__dirname, '..', 'dist', 'html')
await fs.mkdir(outputDir)
const outputPath = path.join(outputDir, pageType + '.html')
await fs.writeFile(outputPath, html)
}
;(async _ => {
await fs.mkdir('dist')
const src = path.join('css', 'index.css')
postcss.transform(src, path.join('dist', 'index.css'), [
postcssImport,
postcss.postcssCssVarSelectors(postcssCssVarSelectorsOptions),
autoprefixer(autoprefixerOptions)
])
postcss.transform(src, path.join('dist', 'index.module.scss'), [
postcssImport,
postcss.postcssCssVarSassVar(),
autoprefixer(autoprefixerOptions)
])
})()