Completed
Branch v9.x (fe5154)
by Rafael S.
02:10
created

rollup.config.js (1 issue)

Labels
Severity
1
/*
2
 * https://github.com/rochars/byte-data
3
 * Copyright (c) 2017-2018 Rafael da Silva Rocha.
4
 */
5
6
/**
7
 * @fileoverview rollup configuration file.
8
 */
9
10
import commonjs from 'rollup-plugin-commonjs';
11
import nodeResolve from 'rollup-plugin-node-resolve';
12
import closure from 'rollup-plugin-closure-compiler-js';
13
14
// License notes for bundles that include dependencies
15
const license = '/*!\n'+
16
  ' * riff-chunks Copyright (c) 2017-2018 Rafael da Silva Rocha.\n'+
17
  ' */\n';
18
19
export default [
20
  // cjs
21
  {
22
    input: 'main.js',
23
    external: ['byte-data'],
24
    output: [
25
      {
26
        file: 'dist/riff-chunks.cjs.js',
27
        name: 'riff-chunks',
28
        format: 'cjs'
29
      }
30
    ],
31
    plugins: [
32
      nodeResolve(),
33
      commonjs(),
0 ignored issues
show
The variable seems to be never declared. If this is a global, consider adding a /** global: */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
34
    ]
35
  },
36
  // umd, es
37
  {
38
    input: 'main.js',
39
    output: [
40
      {
41
        file: 'dist/riff-chunks.umd.js',
42
        name: 'riff-chunks',
43
        format: 'umd'
44
      },
45
      {
46
        file: 'dist/riff-chunks.js',
47
        format: 'es'
48
      }
49
    ],
50
    plugins: [
51
      nodeResolve(),
52
      commonjs(),
53
    ]
54
  },
55
  // browser
56
  {
57
    input: 'main.js',
58
    output: [
59
      {
60
        name: 'riffChunks',
61
        format: 'iife',
62
        file: 'dist/riff-chunks.min.js',
63
        banner: license,
64
        footer: 'window["riffChunks"]=riffChunks;'
65
      }
66
    ],
67
    plugins: [
68
      nodeResolve(),
69
      commonjs(),
70
      closure({
71
        languageIn: 'ECMASCRIPT6',
72
        languageOut: 'ECMASCRIPT5',
73
        compilationLevel: 'SIMPLE',
74
        warningLevel: 'VERBOSE'
75
      })
76
    ]
77
  }
78
];
79