The deno runtime has a built-in compile tool that can be used to compile NPM dependencies. This would remove the need to require the @yao-pkg/pkg package in package.json to build the yuglify binary.
We should migrate our small dependency on NodeJS to the Deno runtime to get the native compile ability.
A few things need to change:
Migrate from package.json and package-lock.json to deno.json and deno.lock, respectively.
Make sure that @yao-pkg/pkg is not installed
Use denoland/deno in the builder step of the Containerfile
Use deno compile instead of npm run compile in the builder step of the Containerfile
The compile command would look like this, which outputs a binary file in the current directory:
The deno runtime has a built-in
compile
tool that can be used to compile NPM dependencies. This would remove the need to require the@yao-pkg/pkg
package in package.json to build the yuglify binary.We should migrate our small dependency on NodeJS to the Deno runtime to get the native compile ability.
A few things need to change:
package.json
andpackage-lock.json
todeno.json
anddeno.lock
, respectively.@yao-pkg/pkg
is not installeddeno compile
instead ofnpm run compile
in the builder step of the ContainerfileThe compile command would look like this, which outputs a binary file in the current directory: