代码拉取完成,页面将自动刷新
import typescript from '@rollup/plugin-typescript';
import terser from '@rollup/plugin-terser';
import { defineConfig } from 'rollup';
import fs from 'fs';
const version = process.env.SEMANTIC_RELEASE_NEXT_VERSION || JSON.parse(fs.readFileSync('./package.json')).version;
console.log('building version:', version);
const banner = `/**
* marked v${version} - a markdown parser
* Copyright (c) 2011-${new Date().getFullYear()}, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
/**
* DO NOT EDIT THIS FILE
* The code in this file is generated from files in ./src/
*/
`;
export default defineConfig([
{
input: 'src/marked.ts',
output: [{
file: 'lib/marked.esm.js',
format: 'esm',
sourcemap: true,
banner
},
{
file: 'lib/marked.umd.js',
format: 'umd',
name: 'marked',
sourcemap: true,
banner
},
{
file: 'marked.min.js',
format: 'umd',
name: 'marked',
sourcemap: false,
banner,
plugins: [terser({
format: {
comments: (node, comment) => {
if (comment.type === 'comment2') {
return comment.value.includes('Copyright (c)');
}
}
}
})]
},
{
file: 'lib/marked.cjs',
format: 'cjs',
name: 'marked',
sourcemap: true,
banner
}],
plugins: [
typescript()
]
}
]);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。