Skip to content

Commit f175922

Browse files
decompil3dprantlf
authored andcommitted
fix: Add JSDoc typings to main export
1 parent b65df05 commit f175922

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

lib/index.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@ import { createProcessor } from 'rollup-copy-transform-css'
44
import cssToModule from './css-to-module.js'
55
import handleError from './error.js'
66

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+
*/
727
export function litCss({
828
include = ['**/*.css'], exclude, minify, inline, plugins,
929
tag = 'css', specifier = 'lit'

0 commit comments

Comments
 (0)