rollup-plugin-lib-style 1.2.0 → 1.2.2

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 CHANGED
@@ -26,10 +26,10 @@ npm i rollup-plugin-lib-style --save-dev
26
26
 
27
27
  ```js
28
28
  // rollup.config.js
29
- import {libStyleLoader} from "rollup-plugin-lib-style"
29
+ import {libStylePlugin} from "rollup-plugin-lib-style"
30
30
 
31
31
  export default {
32
- plugins: [libStyleLoader()],
32
+ plugins: [libStylePlugin()],
33
33
  }
34
34
  ```
35
35
 
@@ -100,7 +100,7 @@ const lessLoader = {
100
100
  }
101
101
 
102
102
  export default {
103
- plugins: [libStyleLoader({loaders: [lessLoader]})],
103
+ plugins: [libStylePlugin({loaders: [lessLoader]})],
104
104
  }
105
105
  ```
106
106
 
@@ -147,7 +147,7 @@ import {libStylePlugin, onwarn} from "rollup-plugin-lib-style"
147
147
 
148
148
  export default {
149
149
  onwarn,
150
- plugins: [libStyleLoader()],
150
+ plugins: [libStylePlugin()],
151
151
  }
152
152
  ```
153
153
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rollup-plugin-lib-style",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "A Rollup plugin that converts CSS and extensions for CSS into CSS modules and imports the generated CSS files",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.es.js",
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import {Plugin, TransformHook, RollupWarning} from "rollup"
1
+ import {PluginImpl, RollupWarning} from "rollup"
2
2
 
3
3
  declare interface ProcessArgs {
4
4
  code: string
@@ -21,7 +21,8 @@ declare interface Options {
21
21
  scopedName?: string
22
22
  }
23
23
 
24
- type onwarn = (warning: RollupWarning, defaultHandler: (warning: string | RollupWarning) => void) => void
25
- type libStylePlugin = (options?: Options) => Plugin
24
+ declare const onwarn: (warning: RollupWarning, defaultHandler: (warning: string | RollupWarning) => void) => void
25
+
26
+ declare const libStylePlugin: PluginImpl<Options>
26
27
 
27
28
  export {onwarn, libStylePlugin}