이 표는 Node.js에서 사용하던 명령어를 Deno 에서 어떻게 사용할 수 있는지를 보여줍니다. 이를 통해 Deno를 더 쉽게 이해하고 사용할 수 있습니다.
•
Deno는 기본적으로 TypeScript를 지원하므로, 별도의 컴파일 과정이 필요하지 않습니다.
•
Deno는 의존성 관리를 위해 npm을 사용하지 않고, 외부 모듈을 URL로 직접 가져옵니다.
•
Deno는 기본 명령어를 통해 다양한 기능을 제공하며, Node.js의 명령어와 유사한 작업을 수행할 수 있습니다.
•
Node.js에서 사용하는 여러 도구 및 명령어는 Deno에서도 해당하는 명령어를 통해 대체할 수 있습니다.
Node.js | Deno |
node file.js | deno run file.js |
ts-node file.ts | deno run file.ts |
node -e | deno eval |
npm i -g | deno install |
npm i / npm install | n/a ¹ |
npm run | deno task |
eslint | deno lint |
prettier | deno fmt |
package.json | deno.json / deno.jsonc / import_map.json |
tsc | deno check ² |
typedoc | deno doc |
jest / ava / mocha / tap / etc | deno test |
nodemon | deno run/lint/test --watch |
nexe / pkg | deno compile |
npm explain | deno info |
nvm / n / fnm | deno upgrade |
tsserver | deno lsp |
nyc / c8 / istanbul | deno coverage |
benchmarks | deno bench |
² Type checking happens automatically, TypeScript compiler is built into the deno binary.