File: rollup.config.js

package info (click to toggle)
node-uuid 8.3.2+~8.3.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,540 kB
  • sloc: javascript: 2,182; sh: 33; makefile: 30
file content (30 lines) | stat: -rw-r--r-- 683 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import nodeResolve from '@rollup/plugin-node-resolve';
import { terser } from 'rollup-plugin-terser';

function chunk(input, name) {
  return {
    input: `dist/esm-browser/${input}.js`,
    output: {
      file: `dist/umd/${name}.min.js`,
      format: 'umd',
      name,
      compact: true,
    },
    plugins: [nodeResolve({ browser: true }), terser()],
  };
}

export default [
  chunk('index', 'uuid'),
  chunk('v1', 'uuidv1'),
  chunk('v3', 'uuidv3'),
  chunk('v4', 'uuidv4'),
  chunk('v5', 'uuidv5'),

  chunk('nil', 'uuidNIL'),

  chunk('version', 'uuidVersion'),
  chunk('validate', 'uuidValidate'),
  chunk('parse', 'uuidParse'),
  chunk('stringify', 'uuidStringify'),
];