1 | const fs = require('fs'); |
||
2 | const licenses = fs.readFileSync('./docs/LICENSES', 'utf-8'); |
||
0 ignored issues
–
show
Unused Code
introduced
by
![]() |
|||
3 | |||
4 | module.exports = { |
||
5 | entry: './index.js', |
||
6 | output: { |
||
7 | // This is the file Google Closure Compiler will use |
||
8 | // to create dist/dist-min.js. If you change the filename |
||
9 | // here, be sure to change in package.json under "compile" |
||
10 | filename: './dist/byte-data.js' |
||
11 | }, |
||
12 | module: { |
||
13 | loaders: [ |
||
14 | { |
||
15 | test: /index\.js$/, |
||
16 | loader: 'string-replace-loader', |
||
17 | query: { |
||
18 | multiple: [ |
||
19 | // to |
||
20 | { |
||
21 | search: 'module.exports.doubleTo8Bytes', |
||
22 | replace: "window['doubleTo8Bytes']", |
||
23 | }, |
||
24 | { |
||
25 | search: 'module.exports.floatTo8Bytes', |
||
26 | replace: "window['floatTo8Bytes']", |
||
27 | }, |
||
28 | { |
||
29 | search: 'module.exports.floatTo4Bytes', |
||
30 | replace: "window['floatTo4Bytes']", |
||
31 | }, |
||
32 | { |
||
33 | search: 'module.exports.intTo6Bytes', |
||
34 | replace: "window['intTo6Bytes']", |
||
35 | }, |
||
36 | { |
||
37 | search: 'module.exports.intTo5Bytes', |
||
38 | replace: "window['intTo5Bytes']", |
||
39 | }, |
||
40 | { |
||
41 | search: 'module.exports.intTo4Bytes', |
||
42 | replace: "window['intTo4Bytes']", |
||
43 | }, |
||
44 | { |
||
45 | search: 'module.exports.intTo3Bytes', |
||
46 | replace: "window['intTo3Bytes']", |
||
47 | }, |
||
48 | { |
||
49 | search: 'module.exports.intTo2Bytes', |
||
50 | replace: "window['intTo2Bytes']", |
||
51 | }, |
||
52 | { |
||
53 | search: 'module.exports.intTo1Byte', |
||
54 | replace: "window['intTo1Byte']", |
||
55 | }, |
||
56 | { |
||
57 | search: 'module.exports.intToNibble', |
||
58 | replace: "window['intToNibble']", |
||
59 | }, |
||
60 | { |
||
61 | search: 'module.exports.stringToBytes', |
||
62 | replace: "window['stringToBytes']", |
||
63 | }, |
||
64 | |||
65 | // from |
||
66 | { |
||
67 | search: 'module.exports.intFromNibble', |
||
68 | replace: "window['intFromNibble']", |
||
69 | }, |
||
70 | { |
||
71 | search: 'module.exports.uIntFromNibble', |
||
72 | replace: "window['uIntFromNibble']", |
||
73 | }, |
||
74 | { |
||
75 | search: 'module.exports.intFrom1Byte', |
||
76 | replace: "window['intFrom1Byte']", |
||
77 | }, |
||
78 | { |
||
79 | search: 'module.exports.uIntFrom1Byte', |
||
80 | replace: "window['uIntFrom1Byte']", |
||
81 | }, |
||
82 | { |
||
83 | search: 'module.exports.intFrom2Bytes', |
||
84 | replace: "window['intFrom2Bytes']", |
||
85 | }, |
||
86 | { |
||
87 | search: 'module.exports.uIntFrom2Bytes', |
||
88 | replace: "window['uIntFrom2Bytes']", |
||
89 | }, |
||
90 | { |
||
91 | search: 'module.exports.intFrom3Bytes', |
||
92 | replace: "window['intFrom3Bytes']", |
||
93 | }, |
||
94 | { |
||
95 | search: 'module.exports.uIntFrom3Bytes', |
||
96 | replace: "window['uIntFrom3Bytes']", |
||
97 | }, |
||
98 | { |
||
99 | search: 'module.exports.intFrom4Bytes', |
||
100 | replace: "window['intFrom4Bytes']", |
||
101 | }, |
||
102 | { |
||
103 | search: 'module.exports.uIntFrom4Bytes', |
||
104 | replace: "window['uIntFrom4Bytes']", |
||
105 | }, |
||
106 | { |
||
107 | search: 'module.exports.uIntFrom5Bytes', |
||
108 | replace: "window['uIntFrom5Bytes']", |
||
109 | }, |
||
110 | { |
||
111 | search: 'module.exports.floatFrom4Bytes', |
||
112 | replace: "window['floatFrom4Bytes']", |
||
113 | }, |
||
114 | { |
||
115 | search: 'module.exports.floatFrom8Bytes', |
||
116 | replace: "window['floatFrom8Bytes']", |
||
117 | }, |
||
118 | { |
||
119 | search: 'module.exports.doubleFrom8Bytes', |
||
120 | replace: "window['doubleFrom8Bytes']", |
||
121 | }, |
||
122 | { |
||
123 | search: 'module.exports.stringFromBytes', |
||
124 | replace: "window['stringFromBytes']", |
||
125 | }, |
||
126 | { |
||
127 | search: 'module.exports.findString', |
||
128 | replace: "window['findString']", |
||
129 | }, |
||
130 | { |
||
131 | search: 'module.exports.packNibbles', |
||
132 | replace: "window['packNibbles']", |
||
133 | }, |
||
134 | { |
||
135 | search: 'module.exports.unpackNibbles', |
||
136 | replace: "window['unpackNibbles']", |
||
137 | } |
||
138 | ] |
||
139 | } |
||
140 | } |
||
141 | ] |
||
142 | } |
||
143 | }; |