Fix browserify require failure
This commit is contained in:
parent
1d88633ada
commit
04efc6d17b
|
@ -55,7 +55,7 @@ var _fs, jszip;
|
|||
if(typeof JSZip !== 'undefined') jszip = JSZip;
|
||||
if (typeof exports !== 'undefined') {
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
if(typeof jszip === 'undefined') jszip = require('./js'+'zip');
|
||||
_fs = require('f'+'s');
|
||||
if(typeof jszip === 'undefined') jszip = require('./jszip');
|
||||
_fs = require('fs');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ var make_offcrypto = function(O, _crypto) {
|
|||
var crypto;
|
||||
if(typeof _crypto !== 'undefined') crypto = _crypto;
|
||||
else if(typeof require !== 'undefined') {
|
||||
try { crypto = require('cry'+'pto'); }
|
||||
try { crypto = require('crypto'); }
|
||||
catch(e) { crypto = null; }
|
||||
}
|
||||
|
||||
|
|
|
@ -63,8 +63,8 @@ var _fs, jszip;
|
|||
if(typeof JSZip !== 'undefined') jszip = JSZip;
|
||||
if (typeof exports !== 'undefined') {
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
if(typeof jszip === 'undefined') jszip = require('./js'+'zip');
|
||||
_fs = require('f'+'s');
|
||||
if(typeof jszip === 'undefined') jszip = require('./jszip');
|
||||
_fs = require('fs');
|
||||
}
|
||||
}
|
||||
var attregexg=/[^\s?>\/]+=["'][^"]*['"]/g;
|
||||
|
|
4
ods.js
4
ods.js
|
@ -61,8 +61,8 @@ var _fs, jszip;
|
|||
if(typeof JSZip !== 'undefined') jszip = JSZip;
|
||||
if (typeof exports !== 'undefined') {
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
if(typeof jszip === 'undefined') jszip = require('./js'+'zip');
|
||||
_fs = require('f'+'s');
|
||||
if(typeof jszip === 'undefined') jszip = require('./jszip');
|
||||
_fs = require('fs');
|
||||
}
|
||||
}
|
||||
var attregexg=/[^\s?>\/]+=["'][^"]*['"]/g;
|
||||
|
|
|
@ -31,7 +31,7 @@ var _fs, jszip;
|
|||
if(typeof JSZip !== 'undefined') jszip = JSZip;
|
||||
if (typeof exports !== 'undefined') {
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
if(typeof jszip === 'undefined') jszip = require('./js'+'zip');
|
||||
_fs = require('f'+'s');
|
||||
if(typeof jszip === 'undefined') jszip = require('./jszip');
|
||||
_fs = require('fs');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1419,8 +1419,8 @@ var _fs, jszip;
|
|||
if(typeof JSZip !== 'undefined') jszip = JSZip;
|
||||
if (typeof exports !== 'undefined') {
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
if(typeof jszip === 'undefined') jszip = require('./js'+'zip');
|
||||
_fs = require('f'+'s');
|
||||
if(typeof jszip === 'undefined') jszip = require('./jszip');
|
||||
_fs = require('fs');
|
||||
}
|
||||
}
|
||||
var attregexg=/([\w:]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g;
|
||||
|
@ -1889,7 +1889,7 @@ var make_offcrypto = function(O, _crypto) {
|
|||
var crypto;
|
||||
if(typeof _crypto !== 'undefined') crypto = _crypto;
|
||||
else if(typeof require !== 'undefined') {
|
||||
try { crypto = require('cry'+'pto'); }
|
||||
try { crypto = require('crypto'); }
|
||||
catch(e) { crypto = null; }
|
||||
}
|
||||
|
||||
|
|
6
xlsx.js
6
xlsx.js
|
@ -1377,8 +1377,8 @@ var _fs, jszip;
|
|||
if(typeof JSZip !== 'undefined') jszip = JSZip;
|
||||
if (typeof exports !== 'undefined') {
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
if(typeof jszip === 'undefined') jszip = require('./js'+'zip');
|
||||
_fs = require('f'+'s');
|
||||
if(typeof jszip === 'undefined') jszip = require('./jszip');
|
||||
_fs = require('fs');
|
||||
}
|
||||
}
|
||||
var attregexg=/([\w:]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g;
|
||||
|
@ -1847,7 +1847,7 @@ var make_offcrypto = function(O, _crypto) {
|
|||
var crypto;
|
||||
if(typeof _crypto !== 'undefined') crypto = _crypto;
|
||||
else if(typeof require !== 'undefined') {
|
||||
try { crypto = require('cry'+'pto'); }
|
||||
try { crypto = require('crypto'); }
|
||||
catch(e) { crypto = null; }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue