@moluoxixi/css-module-global-root-plugin 0.0.6 → 0.0.9
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 +4 -4
- package/es/index.d.ts +2 -4
- package/es/index.mjs +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ pnpm add @moluoxixi/utils
|
|
|
31
31
|
|
|
32
32
|
```typescript
|
|
33
33
|
import { defineConfig } from 'vite'
|
|
34
|
-
import cssModuleGlobalRootPlugin from '@moluoxixi/
|
|
34
|
+
import cssModuleGlobalRootPlugin from '@moluoxixi/css-module-global-root-plugin'
|
|
35
35
|
|
|
36
36
|
export default defineConfig({
|
|
37
37
|
css: {
|
|
@@ -48,7 +48,7 @@ export default defineConfig({
|
|
|
48
48
|
|
|
49
49
|
```typescript
|
|
50
50
|
import { defineConfig } from 'vite'
|
|
51
|
-
import cssModuleGlobalRootPlugin from '@moluoxixi/
|
|
51
|
+
import cssModuleGlobalRootPlugin from '@moluoxixi/css-module-global-root-plugin'
|
|
52
52
|
|
|
53
53
|
export default defineConfig({
|
|
54
54
|
css: {
|
|
@@ -150,7 +150,7 @@ export default defineConfig({
|
|
|
150
150
|
|
|
151
151
|
```typescript
|
|
152
152
|
import { defineConfig } from 'vite'
|
|
153
|
-
import cssModuleGlobalRootPlugin from '@moluoxixi/
|
|
153
|
+
import cssModuleGlobalRootPlugin from '@moluoxixi/css-module-global-root-plugin'
|
|
154
154
|
|
|
155
155
|
export default defineConfig({
|
|
156
156
|
css: {
|
|
@@ -193,7 +193,7 @@ export default defineConfig({
|
|
|
193
193
|
|
|
194
194
|
```typescript
|
|
195
195
|
import { defineConfig } from 'vite'
|
|
196
|
-
import cssModuleGlobalRootPlugin from '@moluoxixi/
|
|
196
|
+
import cssModuleGlobalRootPlugin from '@moluoxixi/css-module-global-root-plugin'
|
|
197
197
|
|
|
198
198
|
export default defineConfig({
|
|
199
199
|
css: {
|
package/es/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export interface CssModuleGlobalRootPluginOptions {
|
|
|
12
12
|
*/
|
|
13
13
|
removeRoot?: boolean;
|
|
14
14
|
}
|
|
15
|
+
type cssModuleGlobalRootPluginType = (config?: CssModuleGlobalRootPluginOptions) => Plugin;
|
|
15
16
|
/**
|
|
16
17
|
* PostCSS 插件:处理 CSS Module 文件中的 :root 选择器
|
|
17
18
|
*
|
|
@@ -68,8 +69,5 @@ export interface CssModuleGlobalRootPluginOptions {
|
|
|
68
69
|
* @param options 插件配置选项
|
|
69
70
|
* @returns {Plugin} PostCSS 插件实例
|
|
70
71
|
*/
|
|
71
|
-
declare
|
|
72
|
-
declare namespace cssModuleGlobalRootPlugin {
|
|
73
|
-
var postcss: boolean;
|
|
74
|
-
}
|
|
72
|
+
declare const cssModuleGlobalRootPlugin: cssModuleGlobalRootPluginType;
|
|
75
73
|
export default cssModuleGlobalRootPlugin;
|
package/es/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const cssModuleGlobalRootPlugin = (options = {}) => {
|
|
2
2
|
const { removeRoot = true } = options;
|
|
3
3
|
return {
|
|
4
4
|
postcssPlugin: "css-module-global-root",
|
|
@@ -52,7 +52,7 @@ function cssModuleGlobalRootPlugin(options = {}) {
|
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
}
|
|
55
|
+
};
|
|
56
56
|
cssModuleGlobalRootPlugin.postcss = true;
|
|
57
57
|
export {
|
|
58
58
|
cssModuleGlobalRootPlugin as default
|