Skip to content

Commit 071ce82

Browse files
Various small fixes (#1636)
1 parent 17c9740 commit 071ce82

File tree

4 files changed

+31
-1
lines changed

4 files changed

+31
-1
lines changed

examples/scripts/path_operations.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,18 @@ console.log(joinPath);
5656
// We can get the current working directory using the built-in cwd method
5757
const current = Deno.cwd();
5858
console.log(current);
59+
60+
// We can get the directory name of the current module using the built-in
61+
// dirname method
62+
const dirname = import.meta.dirname;
63+
console.log(dirname);
64+
65+
// We can get the URL of the current module using the built-in
66+
// url method
67+
const url = import.meta.url;
68+
console.log(url);
69+
70+
// We can get the file name of the current module using the built-in
71+
// filename method
72+
const filename = import.meta.filename;
73+
console.log(filename);

runtime/fundamentals/node.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,17 @@ npm specifiers have the following format:
9797
npm:<package-name>[@<version-requirement>][/<sub-path>]
9898
```
9999

100+
This also allows functionality that may be familar from the `npx` command.
101+
102+
```console
103+
# npx allows remote execution of a package from npm or a URL
104+
$ npx create-next-app@latest
105+
106+
# deno run allows remote execution of a package from various locations,
107+
# and can scoped to npm via the `npm:` specifier.
108+
$ deno run -A npm:create-next-app@latest
109+
```
110+
100111
For examples with popular libraries, please refer to the
101112
[tutorial section](/runtime/tutorials).
102113

runtime/reference/cli/coverage.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ console.log("This line is not ignored");
127127
## Output Formats
128128

129129
By default we support Deno's own coverage format - but you can also output
130-
coverage reports in the lcov format, or in html.
130+
coverage reports in the
131+
[lcov format](https://github.com/linux-test-project/lcov?tab=readme-ov-file) (a
132+
standard file format used to describe code coverage data), or in html.
131133

132134
```bash
133135
deno coverage --lcov --output=cov.lcov

runtime/reference/cli/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ below for more information on each subcommand.
2121
## Dependency management
2222

2323
- [deno add](/runtime/reference/cli/add) - add dependencies
24+
- deno cache - _(Deprecated. Please use
25+
[deno install](/runtime/reference/cli/install/))_
2426
- [deno install](/runtime/reference/cli/install/) - install a dependency or a
2527
script
2628
- [deno uninstall](/runtime/reference/cli/uninstall/) - uninstall a dependency

0 commit comments

Comments
 (0)