forked from semaphore-protocol/semaphore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.ts
More file actions
35 lines (32 loc) · 867 Bytes
/
rollup.config.ts
File metadata and controls
35 lines (32 loc) · 867 Bytes
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
34
35
import typescript from "@rollup/plugin-typescript"
import fs from "fs"
import cleanup from "rollup-plugin-cleanup"
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 ${new Date().getFullYear()}
* @license ${pkg.license}
* @see [Github]{@link ${pkg.homepage}}
*/
`
export default {
input: "src/index.ts",
output: [{ file: pkg.bin.semaphore, format: "es", banner }],
external: [
...Object.keys(pkg.dependencies),
"url",
"fs",
"path",
"child_process",
"@semaphore-protocol/utils/networks"
],
plugins: [
typescript({
tsconfig: "./build.tsconfig.json"
}),
cleanup({ comments: "jsdoc" })
]
}