zx
Advanced tools
Comparing version 1.7.6 to 1.8.0
{ | ||
"name": "zx", | ||
"version": "1.7.6", | ||
"version": "1.8.0", | ||
"description": "A tool for writing better scripts", | ||
@@ -5,0 +5,0 @@ "main": "index.mjs", |
@@ -228,12 +228,2 @@ # 🐚 zx | ||
### Importing from other scripts | ||
It is possible to make use of `$` and other functions via explicit imports: | ||
```js | ||
#!/usr/bin/env node | ||
import {$} from 'zx' | ||
await $`date` | ||
``` | ||
### Passing env variables | ||
@@ -257,5 +247,30 @@ | ||
### Importing from other scripts | ||
It is possible to make use of `$` and other functions via explicit imports: | ||
```js | ||
#!/usr/bin/env node | ||
import {$} from 'zx' | ||
await $`date` | ||
``` | ||
### Scripts without extensions | ||
If script does not have a file extension (like `.git/hooks/pre-commit`), zx | ||
assumes what it is a [ESM](https://nodejs.org/api/modules.html#modules_module_createrequire_filename) | ||
module. | ||
### Markdown scripts | ||
The `zx` can execute scripts written in markdown | ||
([examples/index.md](examples/index.md)): | ||
```bash | ||
zx examples/index.md | ||
``` | ||
### Executing remote scripts | ||
If the argument to the `zx` executable starts with `https://`, the file will be | ||
If the argument to the `zx` executable starts with `https://`, the file will be | ||
downloaded and executed. | ||
@@ -262,0 +277,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
30137
425
285