@hoast/process-postprocess
v3.3.1
Published
Process CSS, HTML, and JS data using PostCSS, Unified's rehype, and Babel plugins and minify using CleanCSS, Unified's rehype, and Terser.
Downloads
35
Maintainers
Readme
@hoast/process-postprocess
Process CSS, HTML, and JS data using PostCSS, Unified's rehype, and Babel plugins and minify using CleanCSS, Unified's rehype, and Terser.
Install
npm install @hoast/process-postprocess
Options
{String} property = 'contents'
Dot notation path to the data property which should be used processed by Mithril.{String} mode = 'html'
Whether to process the data as eithercss
,cjs
,html
, orjs
,mjs
,ts
. Set to either of those options. Thecjs
,mjs
, andts
modes do not process the data differently and only influence how the dependencies are read when watching for changes.{Boolean} minify = true
Whether to minify.{Array} documentPlugins = []
unified rehype
plugins.{String} scriptProcessor = 'babel'
What processor to use for the javascript, if bundling is needed use the value'rollup'
. The babel and terser configurations are still used.{Object} scriptMinifyOptions = {}
terser
options. Set tofalse
to disable JS minification.{Object} scriptOptions = {}
babel
options.{Object} styleMinifyOptions = {}
cssnano
options. Set tofalse
to disable CSS minification.{Object} styleOptions = {}
postcss
options.{Array} stylePlugins = []
postcss
plugins.{Function} filter = null
Custom filter function. The item data is given as the parameter. Returntrue
if it should be processed, returnfalse
if this processor should be skipped.{Number} logLevel = 2
Log level given to the logger.