<commit_before>import babel from "rollup-plugin-babel"
import nodeResolve from "rollup-plugin-node-resolve"
import commonJS from "rollup-plugin-commonjs"
import strip from "rollup-plugin-strip"
import sourcemaps from "rollup-plugin-sourcemaps"
import {
    terser
} from "rollup-plugin-terser"
import pkg from "./package.json"

const banner = `\
/**
 * ${pkg.name} v${pkg.version}
 * ${pkg.description}
 *
 * @author ${pkg.author}
 * @license ${pkg.license}
 * @preserve
 */
`

export default [
    {
        input: "src/index.js",
        output: {
            format: "cjs",
            file: pkg.main,
            sourcemap: true,
            banner
        },
        plugins: [
            nodeResolve({
                mainFields: ['module', 'browser', 'main']
            }),
            sourcemaps(),
            commonJS({
                include: '../**',
                sourceMap: true
            }),
            strip({
                debugger: false,
                functions: [ 'console.*', 'console.warn.apply', 'console.info.apply', 'console.debug.apply', 'console.error.apply' ]
            }),
            babel(),
            terser()
        ]
    },
    {<commit_msg>use es5 version of vivliostyle for es5 output version<commit_after>import babel from "rollup-plugin-babel"
import nodeResolve from "rollup-plugin-node-resolve"
import commonJS from "rollup-plugin-commonjs"
import strip from "rollup-plugin-strip"
import sourcemaps from "rollup-plugin-sourcemaps"
import {
    terser
} from "rollup-plugin-terser"
import pkg from "./package.json"

const banner = `\
/**
 * ${pkg.name} v${pkg.version}
 * ${pkg.description}
 *
 * @author ${pkg.author}
 * @license ${pkg.license}
 * @preserve
 */
`

export default [
    {
        input: "src/index.js",
        output: {
            format: "cjs",
            file: pkg.main,
            sourcemap: true,
            banner
        },
        plugins: [
            nodeResolve({
                mainFields: ['browser', 'main']
            }),
            sourcemaps(),
            commonJS({
                include: '../**',
                sourceMap: true
            }),
            strip({
                debugger: false,
                functions: [ 'console.*', 'console.warn.apply', 'console.info.apply', 'console.debug.apply', 'console.error.apply' ]
            }),
            babel(),
            terser()
        ]
    },
    {
{'fraction_non_alphanumeric': 0.14208782104391052, 'fraction_numerical': 0.0008285004142502071, 'mean_word_length': 1.7319004524886878, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6463749', 'n_tokens_mistral': 713, 'n_tokens_neox': 688, 'n_words': 151}