@@ -4,6 +4,26 @@ import { createProcessor } from 'rollup-copy-transform-css'
4
4
import cssToModule from './css-to-module.js'
5
5
import handleError from './error.js'
6
6
7
+ /**
8
+ * lit CSS rollup plugin
9
+ *
10
+ * @param {Object } opts Options
11
+ * @param {string[] } [opts.include] Pattern to match files which will be processed by the plugin.
12
+ * @param {string[] } [opts.exclude] Pattern to match files which will be ignored by the plugin.
13
+ * @param {Object } [opts.options] Options for the Sass compiler. Use any options supported by the `compileString`
14
+ * method from the Sass package.
15
+ * @param {boolean|Object } [opts.minify] Enables minifying of the transformed CSS output. If an object is specified, it
16
+ * will be passed to the cssnano plugin.
17
+ * @param {boolean|Object } [opts.inline] Enables inlining of stylesheets and other assets. If an object is specified,
18
+ * it will have to include two properties pointing to objects: { stylesheets, assets }. The stylesheets objects will
19
+ * be passed to the postcss-import plugin. The assets objects will be passed to the postcss-url plugin.
20
+ * @param {Object[] } [opts.plugins] An array of PostCSS plugins to fully customise the transformation of the CSS input.
21
+ * @param {string } [opts.tag='css'] The tag used for the tagged template literal exported from the generated module.
22
+ * Use 'css' (default) with both lit-html and fast-element.
23
+ * @param {string } [opts.specifier='lit'] The import specifier used in the import declaration of the tag above. Use
24
+ * 'lit' (default) with lit-html and '@microsoft/fast-element' with fast-element.
25
+ * @returns {import('rollup').Plugin }
26
+ */
7
27
export function litCss ( {
8
28
include = [ '**/*.css' ] , exclude, minify, inline, plugins,
9
29
tag = 'css' , specifier = 'lit'
0 commit comments