Skip to content

Commit 20da66f

Browse files
authored
Merge pull request #49 from atom-community/refactor
BREAKING CHANGE: removes old deprecated babel API
2 parents 54588fa + 6a0c0bf commit 20da66f

4 files changed

Lines changed: 202 additions & 207 deletions

File tree

README.md

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,34 @@ json
6868
css
6969
wasm
7070
visualizer
71-
terser (considered by default in production)
72-
replace (considered by default in production)
7371
```
7472

75-
You can pass an input plugin with their supported option:
73+
Default plugins configured automatically:
74+
```
75+
commonjs
76+
resolve
77+
autoExternal
78+
sourcemaps
79+
terser (in production)
80+
replace (in production)
81+
```
82+
83+
### Override Default Options for the plugins `[name, overriddenOptions, true]`
84+
85+
You can pass an input plugin with the overridden options using the `[name, overriddenOptions, true]` syntax.
86+
87+
```ts
88+
const plugins = createPlugins([
89+
["ts", { tsconfig: "./lib/tsconfig.json" }, true], // third element makes the config merge to and override the default options
90+
"js",
91+
])
92+
```
93+
94+
The difference with the next syntax is that these are merged into the default options and if there is a config with the same name, they override it, but the next syntax completely replaces the default options.
95+
96+
### Completely New Options for the plugins `[name, newOptions]`
97+
98+
You can pass an input plugin with their supported option using the `[name, newOptions]` syntax:
7699

77100
```ts
78101
const plugins = createPlugins([
@@ -81,16 +104,23 @@ const plugins = createPlugins([
81104
])
82105
```
83106

84-
For adding extra plugins, you can:
107+
### Adding New Extra Plugins
108+
109+
For adding extra plugins, you can pass them in array to the second argument
85110

86111
```ts
87112
import multyentry from '@rollup/plugin-multi-entry'
88-
createPlugins(["ts", [multyentry()])
113+
createPlugins(["ts"], [multyentry()])
89114
```
90115

91-
### createConfig
92116

93-
You can use `createConfig` to create the configs you need. This is a simple wrapper around the rollup config.
117+
-----------
118+
119+
### createConfig (not recommend)
120+
121+
This is a simple wrapper around the rollup config, so it is recommended to use the default Rollup syntax.
122+
123+
You can use `createConfig` to create the configs you need.
94124

95125
```ts
96126
createConfig(

package.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,31 @@
11
{
22
"name": "rollup-plugin-atomic",
33
"main": "dist/main.js",
4-
"version": "1.6.4",
4+
"version": "1.9.0",
55
"author": "Amin Yahyaabadi",
66
"description": "Rollup plugin used in atom-ide-community",
77
"keywords": [
88
"rollup",
99
"plugin",
10-
"atomic"
10+
"atomic",
11+
"js",
12+
"javascript",
13+
"ts",
14+
"typescirpt",
15+
"coffee",
16+
"coffeescript",
17+
"json",
18+
"css",
19+
"babel",
20+
"wasm",
21+
"as",
22+
"assemblyscript",
23+
"terser",
24+
"replace",
25+
"sourcemaps",
26+
"commonjs",
27+
"resolve",
28+
"autoExternal"
1129
],
1230
"repository": "https://github.com/atom-ide-community/rollup-plugin-atomic",
1331
"license": "MIT",

0 commit comments

Comments
 (0)