{"size": 620, "ext": "js", "max_stars_repo_path": "generators/app/templates/rollup.config.js", "max_stars_repo_name": "boringapp/create-lib", "max_stars_repo_stars_event_min_datetime": "2020-02-25T08:25:07.000Z", "max_stars_repo_stars_event_max_datetime": "2020-07-26T09:09:06.000Z", "max_issues_repo_path": "generators/app/templates/rollup.config.js", "max_issues_repo_name": "boringapp/create-lib", "max_issues_repo_issues_event_min_datetime": "2020-02-24T03:53:28.000Z", "max_issues_repo_issues_event_max_datetime": "2020-03-23T13:39:40.000Z", "max_forks_repo_path": "generators/app/templates/rollup.config.js", "max_forks_repo_name": "boringapp/create-lib", "max_forks_repo_forks_event_min_datetime": "2020-08-12T05:30:55.000Z", "max_forks_repo_forks_event_max_datetime": "2020-08-12T05:30:55.000Z"}
{"max_stars_count": 2, "max_issues_count": 7, "max_forks_count": 1, "avg_line_length": 22.1428571429, "max_line_length": 58, "alphanum_fraction": 0.6193548387}
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import typescript from '@rollup/plugin-typescript';

import pkg from './package.json';

const getConfig = (inputFile) => ({
  external: [
    ...Object.keys(pkg.dependencies || {}),
    ...Object.keys(pkg.peerDependencies || {}),
  ],
  plugins: [nodeResolve(), commonjs(), typescript()],
  input: inputFile,
  output: [
    {
      dir: 'build',
      format: 'cjs',
      sourcemap: true,
      exports: 'auto',
    },
  ],
});

export default [
  getConfig('src/index.ts'),
  // TODO: add another file here
];
