Closed N8Brooks closed 2 years ago
I personally put both in the readme. Example: https://github.com/dsherret/using_statement
I'm not sure this is something that dnt should handle as in most cases someone could do a simple string replace and it should work. In other scenarios like yours it's a bit more complicated and it would be very difficult for dnt to figure out the appropriate code for that. Maybe the examples could be changed to not do assertions.
Hmmm, you're right. Thanks for the ideas. I'll close this issue.
First off, awesome project!
Currently, the recommendation (#1, #2) is to use
Deno.copyFileSync
to transfer the README.md of the Deno module to the npm package.TypeScript
Deno
examples and TypeScript node examples are similar, but not exactly 1:1.For example, my use-case:
The examples like the following:
Use
Deno
style imports even though that is not valid for node.I'm tempted to use
RegExp
:, but I am wondering if there are any DNT solutions.
Side note: What is the node equivalent of the Deno std asserts module? I feel like that is a potential drawback of this solution.