Skip to content

Commit aec31e9

Browse files
committed
Improve doc comments
1 parent c136d76 commit aec31e9

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

lib/esbuild-plugin-react18-css/src/index.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,25 @@ import postcssModules from "postcss-modules";
66
import autoPrefixer from "autoprefixer";
77
import { compile } from "sass";
88

9+
/** Craete UUID */
910
const uuid = () => (Date.now() * Math.random()).toString(36).slice(0, 8);
1011

1112
interface CSSPluginOptions {
12-
/** by default name is generated without hash so that it is easier and reliable for library users to override some CSS */
13-
generateScopedName?: string | ((className: string, filename: string, css: string) => string);
13+
/**
14+
* By default name is generated without hash so that it is easier and reliable for library users to override some CSS.
15+
* Refer [loader-utils docs](https://github.com/webpack/loader-utils?tab=readme-ov-file#interpolatename) for more options
16+
* @defaultValue A function that generates name similar to [name]__[local] but without .module
17+
*/
18+
generateScopedName?: string | ((className: string, path: string, css: string) => string);
1419
/** set skipAutoPrefixer to true to disable autoprefixer */
1520
skipAutoPrefixer?: boolean;
16-
/** global CSS class prefix. @defaultValue "" */
21+
/** global CSS class prefix. @defaultValue undefined */
1722
globalPrefix?: string;
18-
/** If you want to keep .module.css files */
23+
/** If you want to keep .module.css files. @defaultValue undefined */
1924
keepModules?: boolean;
2025
}
2126

27+
/** Combine client and server CSS */
2228
function generateCombinedCSS(result: BuildResult) {
2329
/** generate combined server and client CSS */
2430
const serverRegExp = new RegExp(`server\\${path.sep}index\\.css`);

turbo.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"doc": {},
1212
"dev": {
1313
"cache": false,
14-
"persistent": true
14+
"persistent": true,
15+
"dependsOn": ["^build"]
1516
}
1617
}
1718
}

0 commit comments

Comments
 (0)