Skip to content

Commit

Permalink
🔖 v0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jaandrle committed Sep 27, 2022
1 parent 8e46fb0 commit cc2e235
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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*: `node@v16.13.0` and `node@v17.9.1` ⇒ 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*: `node@v16.13.0` and `node@v17.9.1` ⇒ 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)
Expand Down Expand Up @@ -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`
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
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 <andrle.jan@centrum.cz>",
"license": "MIT",
"description": "A tool for writing better scripts",
Expand Down

0 comments on commit cc2e235

Please sign in to comment.