Skip to content

Commit

Permalink
I'm a genius
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjenkins94 committed Nov 12, 2023
1 parent 1a2635d commit b5150be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion checkout-monaco.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cd demo
npm uninstall dockerode

if [[ "$(uname -s)" == Darwin* ]]; then
sed -i '' "s/file:[^\"]*/latest/g" package.json
sed -i "" "s/file:[^\"]*/latest/g" package.json
else
sed -i "s/file:[^\"]*/latest/g" package.json
fi
Expand Down
10 changes: 7 additions & 3 deletions tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,18 @@ const importMetaUrlPlugin = {
[baseName]: filePath
},
"external": ["vscode"],
"outDir": assetsDirectory
"format": "cjs",
"outDir": assetsDirectory,
"outExtension": function({ format }) {
return {
"js": ".js"
};
}
});

filePath = path.join(assetsDirectory, baseName + ".js");

await fs.writeFile(filePath, (await fs.readFile(filePath, { "encoding": "utf8" })).replace(/^(import .*? from (?:'|")vscode.*?(?:'|");)$/gmu, "//$1"));

await fs.writeFile(filePath, "module.exports.activate = " + (await import(url.pathToFileURL(filePath).toString()))["activate"].toString());
}

if (!existsSync(filePath)) {
Expand Down

0 comments on commit b5150be

Please sign in to comment.