Skip to content

Commit

Permalink
Merge pull request #136 from tmair/npm-cache-directory
Browse files Browse the repository at this point in the history
create cache folder inside node_modules
  • Loading branch information
orta authored Feb 3, 2022
2 parents 13bd999 + b4570bb commit 94d57ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/strange-crabs-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"remark-shiki-twoslash": patch
---

Moves the cache folder to correctly live inside inside node_modules
2 changes: 1 addition & 1 deletion packages/remark-shiki-twoslash/src/caching.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const cachedTwoslashCall = (

const getNmCache = () => {
if (__dirname.includes("node_modules")) {
return join(__dirname.split("node_modules")[0], ".cache", "twoslash")
return join(__dirname.split("node_modules")[0], "node_modules", ".cache", "twoslash")
} else {
return join(__dirname, "..", "..", ".cache", "twoslash");
}
Expand Down

0 comments on commit 94d57ba

Please sign in to comment.