npm package pragma?
Open
suggestion
- Dominant language
- Rust
- Stars
- 1.3k
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
It might be useful for a module to be able to specify that it's available as an npm package. Perhaps this could be some dnt specific pragma that lives in the file being imported that says the npm package name.
So, for example, say in `https://deno.land/x/code_block_writer@12.0.0/mod.ts`:
```ts
// dnt-npm-package: code-block-writer
export default class Writer {
}
```
Then:
```ts
import CodeBlockWriter from "https://deno.land/x/code_block_writer@12.0.0/mod.ts";
```
Would go to:
```ts
import CodeBlockWriter from "code-block-writer";
```
With a dependency of `^12.0.0`.
Contributor guide
Assessment
This issue has not been assessed yet.