Skip to content

Commit d0ea4c5

Browse files
committed
Ran prettier on rollup
1 parent 877b0a3 commit d0ea4c5

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

Diff for: rollup.config.mjs

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
1-
import typescript from "rollup-plugin-typescript2";
2-
import dts from "rollup-plugin-dts";
1+
import typescript from 'rollup-plugin-typescript2'
2+
import dts from 'rollup-plugin-dts'
33

44
/**
55
* Just a few details about this build implementation:
6-
* - Uses `rollup` along with `rollup-plugin-typescript2` to build to two target files
7-
* (`index.es.js` and `index.cjs.js`). This means that there is only a *single* file now for each
6+
* - Uses `rollup` along with `rollup-plugin-typescript2` to build to two target files
7+
* (`index.es.js` and `index.cjs.js`). This means that there is only a *single* file now for each
88
* target rather than 4 files (ie. `index.js`, `chain.js`, etc.).
9-
* - Rollup has their own official @rollup/plugin-typescript plugin but it does not have the best
10-
* TS declarations support atm (see https://github.com/rollup/plugins/issues/394,
9+
* - Rollup has their own official @rollup/plugin-typescript plugin but it does not have the best
10+
* TS declarations support atm (see https://github.com/rollup/plugins/issues/394,
1111
* https://github.com/rollup/plugins/issues/254, https://github.com/rollup/plugins/issues/243).
1212
* Until these are resolved, I choose to just use `rollup-plugin-typescript2`.
13-
* - `rollup-plugin-typescript2` generates `index.d.ts`, `chain.d.ts`, `result.d.ts` and
14-
* `result-async.d.ts` but this is inconsistent with the generated JavaScript files. This isn't a
15-
* huge issues unless someone tries to import `neverthrow/dist/chain` which would error
16-
* because the underlying `.js` doesn't exist. To remedy this issue, I used `rollup-plugin-dts` to
13+
* - `rollup-plugin-typescript2` generates `index.d.ts`, `chain.d.ts`, `result.d.ts` and
14+
* `result-async.d.ts` but this is inconsistent with the generated JavaScript files. This isn't a
15+
* huge issues unless someone tries to import `neverthrow/dist/chain` which would error
16+
* because the underlying `.js` doesn't exist. To remedy this issue, I used `rollup-plugin-dts` to
1717
* merge `*.d.ts` files into a single `index.d.ts`.
18-
* - It's unfortunately a bit complicated to generate two build outputs but once some of the
18+
* - It's unfortunately a bit complicated to generate two build outputs but once some of the
1919
* issues I've linked to above are resolved this process will become much easier :)
20-
* - Because the build process is kinda two steps (first using `rollup-plugin-typescript2` and then
21-
* using `rollup-plugin-dts`), I first write to `tmp/`, then write the merged `index.d.ts` to
20+
* - Because the build process is kinda two steps (first using `rollup-plugin-typescript2` and then
21+
* using `rollup-plugin-dts`), I first write to `tmp/`, then write the merged `index.d.ts` to
2222
* `dist/` and then moved `index.es.js` and `index.cjs.js` to `dist/`.
2323
*/
2424

2525
export default [
2626
{
27-
input: "src/index.ts",
27+
input: 'src/index.ts',
2828
output: {
29-
file: "tmp/index.es.js",
30-
format: "es",
29+
file: 'tmp/index.es.js',
30+
format: 'es',
3131
},
3232
plugins: [typescript()],
3333
},
3434
{
35-
input: "src/index.ts",
35+
input: 'src/index.ts',
3636
output: {
37-
file: "tmp/index.cjs.js",
38-
format: "cjs",
37+
file: 'tmp/index.cjs.js',
38+
format: 'cjs',
3939
},
4040
plugins: [typescript()],
4141
},
4242
{
43-
input: "tmp/index.d.ts",
44-
output: [{ file: "dist/index.d.ts", format: "es" }],
43+
input: 'tmp/index.d.ts',
44+
output: [{ file: 'dist/index.d.ts', format: 'es' }],
4545
plugins: [dts()],
4646
},
47-
];
47+
]

0 commit comments

Comments
 (0)