@better-css-modules/core 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -45
- package/dist/dts-BWBpx_ii.mjs +1492 -0
- package/dist/dts-BjIczsCF.d.mts +275 -0
- package/dist/index.d.mts +16 -58
- package/dist/index.mjs +2377 -85
- package/dist/internal.d.mts +23 -0
- package/dist/internal.mjs +94 -0
- package/package.json +31 -20
- package/dist/generator-BlFEyanZ.mjs +0 -105
- package/dist/generator-Dy0W5B1c.cjs +0 -179
- package/dist/index.cjs +0 -130
- package/dist/index.d.cts +0 -62
- package/dist/loader.cjs +0 -16
- package/dist/loader.d.cts +0 -3
- package/dist/loader.d.mts +0 -4
- package/dist/loader.mjs +0 -16
package/dist/loader.d.mts
DELETED
package/dist/loader.mjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { i as extractClassNames, r as writeDts, s as loadConfig } from "./generator-BlFEyanZ.mjs";
|
|
2
|
-
//#region src/loader.ts
|
|
3
|
-
let configPromise;
|
|
4
|
-
function getConfig(cwd) {
|
|
5
|
-
if (!configPromise) configPromise = loadConfig(cwd);
|
|
6
|
-
return configPromise;
|
|
7
|
-
}
|
|
8
|
-
async function betterCssModulesLoader(source) {
|
|
9
|
-
const resourcePath = this.resourcePath;
|
|
10
|
-
const cwd = this.rootContext || process.cwd();
|
|
11
|
-
const config = await getConfig(cwd);
|
|
12
|
-
await writeDts(resourcePath, extractClassNames(source), config.outDir, cwd);
|
|
13
|
-
return source;
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { betterCssModulesLoader as default };
|