mirror of
https://github.com/AtHeartEngineering/bandada.git
synced 2026-01-09 02:17:53 -05:00
28 lines
741 B
TypeScript
28 lines
741 B
TypeScript
import typescript from "@rollup/plugin-typescript"
|
|
import * as fs from "fs"
|
|
import cleanup from "rollup-plugin-cleanup"
|
|
|
|
const pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8"))
|
|
const banner = `/**
|
|
* @module ${pkg.name}
|
|
* @version ${pkg.version}
|
|
* @file ${pkg.description}
|
|
* @copyright Ethereum Foundation 2023
|
|
* @license ${pkg.license}
|
|
* @see [Github]{@link ${pkg.homepage}}
|
|
*/`
|
|
|
|
export default {
|
|
input: "src/index.ts",
|
|
output: [
|
|
{ file: pkg.exports.require, format: "cjs", banner, exports: "auto" },
|
|
{ file: pkg.exports.import, format: "es", banner }
|
|
],
|
|
plugins: [
|
|
typescript({
|
|
tsconfig: "./tsconfig.build.json"
|
|
}),
|
|
cleanup({ comments: "jsdoc" })
|
|
]
|
|
}
|