Skip to content

Commit 081533d

Browse files
committed
fix import issue
1 parent f68735c commit 081533d

File tree

5 files changed

+11
-14
lines changed

5 files changed

+11
-14
lines changed

dist/1.x/ByteBeat.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* ByteBeat@1.0.13, license MIT */
1+
/* ByteBeat@1.0.15, license MIT */
22
(function (global, factory) {
33
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
44
typeof define === 'function' && define.amd ? define(factory) :
@@ -297,9 +297,7 @@
297297
}
298298

299299
static s_fnHeader = (function() {
300-
const keys = {
301-
'import': true,
302-
};
300+
const keys = {};
303301
const windowKeep = new Set([
304302
'parseInt',
305303
'parseFloat',
@@ -392,6 +390,7 @@
392390
return Object.prototype.hasOwnProperty.call(obj, p1) ? (name + p1) : str;
393391
}
394392
x = x.replace(/\bint\b/g, 'floor');
393+
x = x.replace(/\bimport\b/g, 'notimport');
395394
x = x.replace(/(?:extra\.)?(\w+)/g, function(substr, p1) {
396395
return replacer(substr, extra, p1, 'extra.');
397396
});

dist/1.x/ByteBeat.module.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* ByteBeat@1.0.13, license MIT */
1+
/* ByteBeat@1.0.15, license MIT */
22
class WrappingStack {
33
constructor(stackSize = 256) {
44
let sp = 0;
@@ -291,9 +291,7 @@ class ByteBeatCompiler {
291291
}
292292

293293
static s_fnHeader = (function() {
294-
const keys = {
295-
'import': true,
296-
};
294+
const keys = {};
297295
const windowKeep = new Set([
298296
'parseInt',
299297
'parseFloat',
@@ -386,6 +384,7 @@ class ByteBeatCompiler {
386384
return Object.prototype.hasOwnProperty.call(obj, p1) ? (name + p1) : str;
387385
}
388386
x = x.replace(/\bint\b/g, 'floor');
387+
x = x.replace(/\bimport\b/g, 'notimport');
389388
x = x.replace(/(?:extra\.)?(\w+)/g, function(substr, p1) {
390389
return replacer(substr, extra, p1, 'extra.');
391390
});

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bytebeat.js",
3-
"version": "1.0.13",
3+
"version": "1.0.15",
44
"description": "a bytebeat library",
55
"module": "src/ByteBeatNode.js",
66
"scripts": {

src/ByteBeatCompiler.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,7 @@ export default class ByteBeatCompiler {
244244
}
245245

246246
static s_fnHeader = (function() {
247-
const keys = {
248-
'import': true,
249-
};
247+
const keys = {};
250248
const windowKeep = new Set([
251249
'parseInt',
252250
'parseFloat',
@@ -339,6 +337,7 @@ export default class ByteBeatCompiler {
339337
return Object.prototype.hasOwnProperty.call(obj, p1) ? (name + p1) : str;
340338
}
341339
x = x.replace(/\bint\b/g, 'floor');
340+
x = x.replace(/\bimport\b/g, 'notimport');
342341
x = x.replace(/(?:extra\.)?(\w+)/g, function(substr, p1) {
343342
return replacer(substr, extra, p1, 'extra.');
344343
});

0 commit comments

Comments
 (0)