Passed
Branch master (6eb04c)
by Rafael S.
01:12
created

rollup.config.js

Complexity

Total Complexity 0
Complexity/F 0

Size

Lines of Code 63
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
eloc 50
c 1
b 0
f 0
nc 1
dl 0
loc 63
wmc 0
mnd 0
bc 0
fnc 0
bpm 0
cpm 0
noi 1
1
/*
2
 * Copyright (c) 2018 Rafael da Silva Rocha.
3
 */
4
5
/**
6
 * @fileoverview rollup configuration file.
7
 * @see https://github.com/rochars/ieee754-buffer
8
 */
9
10
import closure from 'rollup-plugin-closure-compiler-js';
11
import fs from 'fs';
12
13
// Externs
14
const externsFile = fs.readFileSync('./externs/ieee754-buffer.js', 'utf8');
15
16
// Legal
17
const license = '/*!\n'+
18
' * Copyright (c) 2018 Rafael da Silva Rocha.\n' +
19
' * Copyright (c) 2013 DeNA Co., Ltd.\n' +
20
' * Copyright (c) 2010, Linden Research, Inc\n' +
21
' *\n' +
22
' * Permission is hereby granted, free of charge, to any person obtaining\n' +
23
' * a copy of this software and associated documentation files (the\n' +
24
' * "Software"), to deal in the Software without restriction, including\n' +
25
' * without limitation the rights to use, copy, modify, merge, publish,\n' +
26
' * distribute, sublicense, and/or sell copies of the Software, and to\n' +
27
' * permit persons to whom the Software is furnished to do so, subject to\n' +
28
' * the following conditions:\n' +
29
' *\n' +
30
' * The above copyright notice and this permission notice shall be\n' +
31
' * included in all copies or substantial portions of the Software.\n' +
32
' *\n' +
33
' * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\n' +
34
' * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n' +
35
' * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n' +
36
' * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n' +
37
' * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n' +
38
' * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n' +
39
' * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n' +
40
' */\n';
41
42
// GCC UMD footer, compatible with old browsers, Node and AMD loaders
43
const footer = 
44
  "var ieee754Buffer=exports;" +
45
  "typeof module!=='undefined'?module.exports=exports :" +
46
  "typeof define==='function'&&define.amd?define(['exports'],exports) :" +
47
  "typeof global!=='undefined'?global.ieee754Buffer=exports:null;";
48
49
export default [
50
  // UMD, minified
51
  {
52
    input: 'ieee754-buffer.js',
53
    output: [
54
      {
55
        file: 'ieee754-buffer.umd.js',
56
        format: 'cjs',
57
        strict: false,
58
        banner: 'var exports=exports||{};'
59
      }
60
    ],
61
    plugins: [
62
      closure({
63
        languageIn: 'ECMASCRIPT6',
64
        languageOut: 'ECMASCRIPT5',
65
        compilationLevel: 'ADVANCED',
66
        warningLevel: 'VERBOSE',
67
        outputWrapper: license + '%output%' + footer,
68
        externs: [{src: externsFile + 'exports={};'}]
69
      })
70
    ]
71
  },
0 ignored issues
show
Bug introduced by
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...
72
];
73