🔍Automatic discovery of ports
If you have published your module both on deno.land/x and NPM Denoify should be able to automatically resolve your Deno distribution, what do I mean by that?
Examples of resolutions that denoify can perform automatically
Let's assume we are in a project, in our node_modules
directory we have the following three Denoified modules:
tsafe in version
0.10.1
my-dummy-npm-and-deno-module in version
0.4.3
leac in version
0.6.0
Input
Output
Now if we run npx denoify
it will generates this:
If tsafe
wasn't published on deno.land/x instead of https://deno.land/x/tsafe@v0.10.1/assert.ts
we would have https://raw.githubusercontent.com/garronej/tsafe/v0.10.1/deno_dist/assert.ts
.
Denoify always find the files on GitHub first and then try to see if it can get the same file with a deno.land/x url on a best effort basis.
If you want it to work your repo should have the same name as the deno module you have published ( we replace the -
by _
).
Troubleshooting
For some reason, automatic resolution dosen't work well with your module?
Please reach out by opening a discussion!
If you want to check for common problem before contacting the community here are some things you might want to check out:
If you are using the
--out
CLI parameter definedenoify.out
in yourpackage.json
instead.Makes sure you do not get this message when you run
npx denoify
. If you do make sur yourmain
property of yourpackage.json
is correct.Makes sure you have a repository field in your
package.json
that points to the correct repo. ExampleMake sure you create a git Tag for every NPM version you release. (A git tag is created when you create a GitHub Release)
Make sure there is always a
tsconfig.json
file at the root of your repo, on every version tag, and that it specifies the optioncompilerOptions.outDir
.
Last updated