@hoast/process-postprocess

3.3.1 • Public • Published

@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 either css, cjs, html, or js, mjs, ts. Set to either of those options. The cjs, mjs, and ts 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 to false to disable JS minification.

  • {Object} scriptOptions = {} babel options.

  • {Object} styleMinifyOptions = {} cssnano options. Set to false 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. Return true if it should be processed, return false if this processor should be skipped.

  • {Number} logLevel = 2 Log level given to the logger.

Package Sidebar

Install

npm i @hoast/process-postprocess

Weekly Downloads

15

Version

3.3.1

License

MIT

Unpacked Size

21.4 kB

Total Files

9

Last publish

Collaborators

  • redkenrok