Skip to content

Commit 65b7460

Browse files
authored
feat(plugin): Build plugin (#3)
1 parent 31cb9e4 commit 65b7460

9 files changed

+1758
-124
lines changed

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# typed-css-modules-rollup-plugin
1+
# rollup-plugin-typed-css-modules
22

33
Generate declaration typings with glob support
44
This plugin is extended from [typed-css-modules](https://github.com/Quramy/typed-css-modules) plugin.
@@ -7,25 +7,25 @@ This plugin is extended from [typed-css-modules](https://github.com/Quramy/typed
77

88
```bash
99
# yarn
10-
yarn add typed-css-modules-rollup-plugin --dev
10+
yarn add rollup-plugin-typed-css-modules --dev
1111

1212
# npm
13-
npm i typed-css-modules-rollup-plugin --save-dev
13+
npm i rollup-plugin-typed-css-modules --save-dev
1414
```
1515

1616
## Usage
1717

1818
```js
1919
// rollup.config.js
20-
import dts from "typed-css-modules-rollup-plugin";
20+
import dts from 'rollup-plugin-typed-css-modules';
2121

2222
export default {
23-
input: "src/index.js",
23+
input: 'src/index.js',
2424
output: {
25-
file: "dist/app.js",
26-
format: "cjs",
25+
file: 'dist/app.js',
26+
format: 'cjs'
2727
},
28-
plugins: [dts()],
28+
plugins: [dts()]
2929
};
3030
```
3131

index.d.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import rollup from 'rollup';
2+
import { run } from 'typed-css-modules';
3+
4+
/**
5+
* Creating css modules declaration files using Rollup
6+
*/
7+
export default function typedCssModules(
8+
options?: Parameters<typeof run>[1]
9+
): rollup.Plugin;

0 commit comments

Comments
 (0)