Skip to content

Commit 5139182

Browse files
committed
fix: update readme
1 parent d73cb1f commit 5139182

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ You should also install the peer dependencies:
2525
Create a `rollup.config.js` file at the root of the project with the following content. See API section for more details
2626

2727
```js
28-
const { createPlugins, createConfig } = requore("rollup-plugin-atomic");
28+
const { createPlugins, createConfig } = require("rollup-plugin-atomic");
2929

30-
const plugins = createPlugins(["js"], true);
30+
const plugins = createPlugins(["ts", "js"], true);
3131

3232
const config = createConfig(
33-
"src/x-terminal.js",
33+
"src/main.ts",
3434
"dist",
3535
"cjs",
3636
["atom", "electron", "node-pty-prebuilt-multiarch"],
@@ -67,3 +67,24 @@ You can create multiple configs using `createConfig` and export them as an array
6767
```js
6868
module.exports = [config1, config2]
6969
```
70+
71+
## Only using createPlugins:
72+
73+
you can only use `createPlugins` and then export your config with the typical rollup style:
74+
```js
75+
const { createPlugins } = require("rollup-plugin-atomic");
76+
77+
const plugins = createPlugins(["ts", "js"], true);
78+
79+
module.exports = {
80+
input: "src/main.ts",
81+
output: [
82+
{
83+
dir: "dist",
84+
format: "cjs",
85+
sourcemap: true,
86+
},
87+
],
88+
plugins: plugins,
89+
}
90+
```

0 commit comments

Comments
 (0)