forked from privacy-scaling-explorations/p0tion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.ts
33 lines (30 loc) · 930 Bytes
/
rollup.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import * as fs from "fs"
import typescript from "rollup-plugin-typescript2"
import autoExternal from "rollup-plugin-auto-external"
import cleanup from "rollup-plugin-cleanup"
import copy from "rollup-plugin-copy"
const pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8"))
const banner = `#!/usr/bin/env node
/**
* @module ${pkg.name}
* @version ${pkg.version}
* @file ${pkg.description}
* @copyright Ethereum Foundation 2022
* @license ${pkg.license}
* @see [Github]{@link ${pkg.homepage}}
*/`
export default {
input: "src/index.ts",
output: [{ file: pkg.main, format: "es", banner }],
plugins: [
autoExternal(),
(typescript as any)({
tsconfig: "./build.tsconfig.json",
useTsconfigDeclarationDir: true
}),
(copy as any)({
targets: [{ src: "public/*", dest: "dist/public" }]
}),
cleanup({ comments: "jsdoc" })
]
}