Commit 914fc652 authored by MARIE FLORES's avatar MARIE FLORES Committed by Guillaume Grossetie
Browse files

add cssnano

parent 2a89d235
'use strict'
const cssnano = require('cssnano')
const litePreset = require('cssnano-preset-lite')
const cssnanoPreset = litePreset({ discardComments: false })
const ospath = require('path')
const asciidoctor = require('@asciidoctor/core')()
const documentModelConverter = require(`${__dirname}/lib/document-model-converter.js`)
......@@ -26,7 +29,12 @@ module.exports = function (eleventyConfig, rest) {
if (parsed.name.startsWith("_")) {
return
}
const result = await postcss([postcssAtImport, autoprefixer, postcssPresetEnv({ browsers: 'defaults,not IE 11' })])
const result = await postcss([
postcssAtImport,
autoprefixer,
postcssPresetEnv({ browsers: 'defaults,not IE 11' }),
cssnano({ preset: cssnanoPreset})
])
.process(inputContent, { from: inputPath, to: '_site/assets/css/main.css' })
return async (data) => {
return result.css
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment