Skip to content

Commit

Permalink
docs: change readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
s3xysteak committed Jul 1, 2024
1 parent 4af6b4c commit a229834
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ console.log(val)
// ...
const val = await expCollector(
'./index.ts',
fileURLToPath(new URL('./src/', import.meta.url))
{
base: fileURLToPath(new URL('./src/', import.meta.url))
// alias: { '~': fileURLToPath(new URL('.', import.meta.url)) } // 也支持别名
}
)
// 结果将会和上面的例子相同。
```
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ Or customize the base path.
// ...
const val = await expCollector(
'./index.ts',
fileURLToPath(new URL('./src/index.ts', import.meta.url))
{
base: fileURLToPath(new URL('./src/index.ts', import.meta.url))
// alias: { '~': fileURLToPath(new URL('.', import.meta.url)) } // Also support aliases.
}
)
// the value will be same as above example.
```
Expand Down

0 comments on commit a229834

Please sign in to comment.