-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
33 lines (26 loc) · 1008 Bytes
/
rollup.config.js
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 fs from "fs"
import { defineConfig } from "rollup"
const packageJsonContent = fs.readFileSync("./package.json").toString()
const version = process.env.SEMANTIC_RELEASE_NEXT_VERSION || JSON.parse(packageJsonContent).version
console.info("Building version:", version)
const banner = `/**
* HtmlMark v${version} - a markdown parser
* Copyright (c) 2020-${new Date().getFullYear()}, Kiran Parajuli. (GNU Licensed)
* https://github.com/kiranparajuli589/htmlmark
*/
/**
* DO NOT EDIT THIS FILE
* The code in this file is generated from files in ./lib/index.js
*/
`
export default defineConfig([{
input: "lib/index.js", output: [{
file: "dist/htmlmark.esm.js", format: "esm", sourcemap: true, banner
}, {
file: "dist/htmlmark.min.js", format: "umd", name: "htmlmark", sourcemap: false, banner
}, {
file: "dist/htmlmark.cjs", format: "cjs", sourcemap: true, name: "htmlmark", banner
}, {
file: "dist/htmlmark.umd.js", format: "umd", name: "htmlmark", sourcemap: true, banner
}]
}])