feat(install): added --prod to skip dev deps and @types (#33248)
Reland of #32863, which was reverted in #33212 to be relanded for Deno
v2.8.
---
- Added the `--prod` flag to `deno install` that skips `devDependencies`
from `package.json`.
- Added the `--skip-types` flag to `deno install`, only available with
`--prod`. It makes `@types/*` packages skipped as well from both
`package.json` and `deno.json` imports. It may be unsafe to use, as only
`name.starts_with` is used to skip `@types/` packages, but such packages
not guaranteed to have only types actually.
- When combined with `--entrypoint`, the module graph is built as "code
only" (excludes type-only dependencies).
- Conflicts with `--global` and `--dev` flags.
Closes #26121
Closes https://github.com/denoland/deno/issues/33181
Co-authored-by: Daniil Sivak <seroperson@gmail.com>