Improved case switching for node/browsers
This commit is contained in:
parent
962fe68632
commit
b9e75c983d
|
@ -361,20 +361,20 @@ mscript.tests = function tests () {
|
|||
console.timeEnd('Tests took');
|
||||
};
|
||||
|
||||
if (!module.parent) {
|
||||
if (typeof process !== 'undefined') {
|
||||
fs = require('fs');
|
||||
input = process.argv[2];
|
||||
mscript.init();
|
||||
} else {
|
||||
//web
|
||||
}
|
||||
} else {
|
||||
console.log('module here');
|
||||
if (typeof module !== 'undefined' && !module.parent) {
|
||||
//node script
|
||||
fs = require('fs');
|
||||
input = process.argv[2];
|
||||
mscript.init();
|
||||
} else if (typeof module !== 'undefined' && module.parent) {
|
||||
//module
|
||||
fs = require('fs');
|
||||
module.exports = mscript;
|
||||
} else {
|
||||
//web
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
CAM # - go to camera frame #
|
||||
|
|
Loading…
Reference in New Issue