admin: fixed alias script (#1494).

This commit is contained in:
Richard Moore 2021-10-16 01:53:12 -04:00
parent a5c6a468f4
commit 8f3d71dc5f
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651

@ -52,7 +52,7 @@ async function alias(name: string): Promise<void> {
if (replace) {
inputFilename = replace;
transform = function(content: string) {
content = content.replace(/(\/\/# sourceMappingURL=)(.*)$/g, (all, prefix, mapFilename) => {
content = content.replace(/^(\/\/# sourceMappingURL=)(.*)$/mg, (all, prefix, mapFilename) => {
return prefix + filename + ".map";
});
return content;
@ -132,7 +132,7 @@ async function alias(name: string): Promise<void> {
console.log(colorify.bold(`Aliasing Node ESM to Browser ESM...`));
const dirnames = getOrdered(true);
for (let i = 0; i < dirnames.length; i++) {
//if (dirnames[i] !== "base64") { continue; }
//if (dirnames[i] !== "signing-key") { continue; }
await alias(dirnames[i]);
}
})();