mirror of
https://github.com/SamEyeBam/animate.git
synced 2025-09-28 06:55:25 +00:00
larry babby and threejs for glsl
This commit is contained in:
36
webGl/my-threejs-test/node_modules/@parcel/packager-js/lib/CJSOutputFormat.js
generated
vendored
Normal file
36
webGl/my-threejs-test/node_modules/@parcel/packager-js/lib/CJSOutputFormat.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.CJSOutputFormat = void 0;
|
||||
class CJSOutputFormat {
|
||||
constructor(packager) {
|
||||
this.packager = packager;
|
||||
}
|
||||
buildBundlePrelude() {
|
||||
let res = '';
|
||||
let lines = 0;
|
||||
for (let [source, specifiers] of this.packager.externals) {
|
||||
// CJS only supports the namespace symbol. This ensures that all accesses
|
||||
// are live and the `this` binding is correct.
|
||||
let namespace = specifiers.get('*');
|
||||
if (namespace) {
|
||||
res += `var ${namespace} = require(${JSON.stringify(source)});\n`;
|
||||
lines++;
|
||||
} else {
|
||||
res += `require(${JSON.stringify(source)});\n`;
|
||||
lines++;
|
||||
}
|
||||
}
|
||||
if (res.length > 0) {
|
||||
res += '\n';
|
||||
lines++;
|
||||
}
|
||||
return [res, lines];
|
||||
}
|
||||
buildBundlePostlude() {
|
||||
return ['', 0];
|
||||
}
|
||||
}
|
||||
exports.CJSOutputFormat = CJSOutputFormat;
|
Reference in New Issue
Block a user