Skip to content

Commit

Permalink
Rename Rollup config
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarber623 committed Oct 14, 2023
1 parent 6a5d364 commit 1a2507e
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions rollup.config.mjs → rollup.config.js
Expand Up @@ -2,21 +2,22 @@ import { readFileSync } from 'node:fs';

import terser from '@rollup/plugin-terser';

const pkg = JSON.parse(readFileSync('./package.json'));
const package_ = JSON.parse(readFileSync('./package.json'));

const input = './src/routerrouter.mjs';
const input = './src/routerrouter.js';
const name = 'RouterRouter';

const banner = `/*!
* ${name} v${pkg.version}
const banner = `/**
* @name ${name}
* @version ${package_.version}
*
* ${pkg.description}
* @file ${package_.description}
*
* Source code available at: ${pkg.homepage}
* {@link ${package_.homepage}}
*
* (c) 2013-present ${pkg.author.name} (${pkg.author.url})
* @copyright 2013-${new Date().getFullYear()} ${package_.author.name} (${package_.author.url})
*
* ${name} may be freely distributed under the ${pkg.license} license.
* @license ${package_.license}
*/
`;

Expand All @@ -34,7 +35,7 @@ export default [
input,
output: {
banner,
file: pkg.module,
file: package_.exports.import,
format: 'es'
},
plugins: [terser(terserConfig)]
Expand All @@ -43,18 +44,17 @@ export default [
input,
output: {
banner,
file: pkg.main,
format: 'umd',
name
file: package_.exports.require,
format: 'cjs'
},
plugins: [terser(terserConfig)]
},
{
input,
output: {
banner,
file: pkg.browser,
format: 'umd',
file: package_.browser,
format: 'iife',
name
},
plugins: [terser()]
Expand Down

0 comments on commit 1a2507e

Please sign in to comment.