File tree 1 file changed +23
-9
lines changed
1 file changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -523,11 +523,7 @@ If the argument to the `zx` executable starts with `https://`, the file will be
523
523
downloaded and executed .
524
524
525
525
` ` ` bash
526
- zx https://medv.io/example-script.mjs
527
- ` ` `
528
-
529
- ` ` ` bash
530
- zx https://medv.io/game-of-life.mjs
526
+ zx https://medv.io/game-of-life.js
531
527
` ` `
532
528
533
529
### Executing scripts from stdin
@@ -546,10 +542,28 @@ By default `child_process` does not include aliases and bash functions.
546
542
But you are still able to do it by hand . Just attach necessary directives to ` $.prefix ` .
547
543
548
544
` ` ` js
549
- {
550
- $.prefix += 'export NVM_DIR=$HOME/.nvm; source $NVM_DIR/nvm.sh; '
551
- await $ ` nvm - v `
552
- }
545
+ $.prefix += 'export NVM_DIR=$HOME/.nvm; source $NVM_DIR/nvm.sh; '
546
+ await $ ` nvm - v `
547
+ ` ` `
548
+
549
+ ### Using GitHub Actions
550
+
551
+ Default GitHub Action runner comes with npx installed .
552
+
553
+ ` ` ` yaml
554
+ jobs:
555
+ build:
556
+ runs-on: ubuntu-latest
557
+ steps:
558
+ - uses: actions/checkout@v3
559
+
560
+ - name: Build
561
+ env:
562
+ FORCE_COLOR: 3
563
+ run: |
564
+ npx zx <<'EOF'
565
+ await $ ` ... `
566
+ EOF
553
567
` ` `
554
568
555
569
## License
You can’t perform that action at this time.
0 commit comments