-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,25 +8,25 @@ This is primarily achieved by using [shelljs/shelljs](https://github.com/shelljs | |
You can compare the final script code to `zx` example: | ||
```javascript | ||
#!/usr/bin/env nodejsscript | ||
|
||
echo(s.grep("name", "package.json")); | ||
|
||
s.run("git branch --show-current").xargs(s.run, "dep deploy --branch={}"); | ||
s.run("git branch --show-current") | ||
.xargs(s.run, "dep deploy --branch={}"); | ||
|
||
s.run("sleep 1; echo 1"); | ||
s.run("sleep 2; echo 2"); | ||
s.run("sleep 3; echo 3"); | ||
|
||
import { join } from "node:path"; | ||
const name= "foo bar"; | ||
s.mkdir(join(s.tempdir(), name)); | ||
s.mkdir(cli.xdg.temp(name)); | ||
``` | ||
…also see [examples](./examples). | ||
|
||
## Installation | ||
|
||
1. tested/used on *NodeJS*: `[email protected]` and `[email protected]` ⇒ for installation follow [nvm-sh/nvm: Node Version Manager](https://github.com/nvm-sh/nvm)[^OR] | ||
1. `npm install https://github.com/jaandrle/nodejsscript --global` (**will be registered also in npm repository**) | ||
1. alternatively install locally | ||
1. tested/used on *NodeJS*: `[email protected]` and `[email protected]` ⇒ for installation follow [nvm-sh/nvm: Node Version Manager](https://github.com/nvm-sh/nvm)[^ORnpm] | ||
1. `npm install nodejsscript --location=global` … alternatively install locally: `npm install nodejsscript`[^ORnjs] | ||
|
||
## Goods | ||
[s #shelljs](./docs/modules/s.md) | ||
|
@@ -120,4 +120,5 @@ s.$("-g").rm("*.txt"); | |
- [Contributor Covenant Code of Conduc](./CODE_OF_CONDUCT.md) | ||
- [How to contribute](./CONTRIBUTING.md) | ||
[^OR]: Alternatively `curl -sL install-node.vercel.app/16.13.0 | bash` | ||
[^ORnpm]: Alternatively `curl -sL install-node.vercel.app/16.13.0 | bash` | ||
[^ORnjs]: Or: `npm install https://github.com/jaandrle/nodejsscript --global` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "nodejsscript", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"author": "Jan Andrle <[email protected]>", | ||
"license": "MIT", | ||
"description": "A tool for writing better scripts", | ||
|