Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed https://markdown-it.github.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

51 lines
1.1 KiB

import nodeResolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import terser from '@rollup/plugin-terser'
import { readFileSync } from 'fs'
const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url)))
export default {
input: 'index.mjs',
output: [
{
file: 'dist/markdown-it.js',
format: 'umd',
name: 'markdownit',
plugins: [
// Here terser is used only to force ascii output
terser({
mangle: false,
compress: false,
format: {
comments: 'all',
beautify: true,
ascii_only: true,
indent_level: 2
}
})
]
},
{
file: 'dist/markdown-it.min.js',
format: 'umd',
name: 'markdownit',
plugins: [
terser({
format: {
ascii_only: true
}
})
]
}
],
plugins: [
nodeResolve({ preferBuiltins: true }),
commonjs(),
{
banner() {
return `/*! ${pkg.name} ${pkg.version} https://github.com/${pkg.repository} @license ${pkg.license} */`
}
}
]
}