diff --git a/README.md b/README.md index c3bb282..6fce619 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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` diff --git a/package-lock.json b/package-lock.json index fe2a3f9..3c8d939 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "nodejsscript", - "version": "0.7.0", + "version": "0.7.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "nodejsscript", - "version": "0.7.0", + "version": "0.7.1", "license": "MIT", "dependencies": { "@types/sade": "^1.7.4", diff --git a/package.json b/package.json index dba45db..999b3ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodejsscript", - "version": "0.7.0", + "version": "0.7.1", "author": "Jan Andrle ", "license": "MIT", "description": "A tool for writing better scripts",