I was intrigued to test Ryan Dhal's Deno and nothing better than some personal project to make it right.
Some important stuff before:
You don't need anything more than Deno, but some tasks will be converted to some Deno "out of the box" command (e.g.
deno test), and for others, I'll use a Makefile for convenience.
package-lock.json, and all related stuff. Check this file for all
.ts to all import statements.
One easy way using VS Code "search and replace":
- Enable regex
- For Search field use from
- For Replace field use from
Deno uses strict guidelines using the TypeScript and style guide. It includes some logical/code adaptations.
- Short version: https://github.com/denoland/deno/blob/master/docs/testing.md
- Follow the "out of the box" test suite https://deno.land/std/testing
- Convert from
npm testto something like:
# Optional Makefile for convenience test: deno test
npm install. You can use
dep.ts, but it's not required. I'm using a Makefile to keep track of all dependencies:
# Optional Makefile for convenience install: deno install --unstable --allow-read --allow-run -f https://deno.land/x/denon/denon.ts;
Here I'm using Denon module, the Nodemon for Deno, to watch and reload file changes.
# Optional Makefile for convenience dev: denon $(ENTRY_POINT) run: deno run $(ENTRY_POINT)
Change the entry point file name from
mod.ts Deno/Rust standard.
All these steps are documented on my project: https://github.com/jotafeldmann/elevators/pull/1
Enjoy and, please, send me feedback to improve.