node-automator 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +27 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # Tutorial
2
+ > Install the dependencies
3
+ ```sh
4
+ $ npm install
5
+ ```
6
+ # Node
7
+ ```sh
8
+ $ node . ./examples/print_env.yml
9
+ ```
10
+ # Npx
11
+ > You can pass encoded configuration content instead of a file path
12
+ ```js
13
+ function encode(input) {
14
+ return btoa(unescape(encodeURIComponent(input)))
15
+ }
16
+ var configuration = `
17
+ - type: print
18
+ data:
19
+ content: Hello, I'm <<USERNAME>>
20
+ `;
21
+ console.log(encode(configuration));
22
+ // output: Ci0gdHlwZTogcHJpbnQKICBkYXRhOgogICAgY29udGVudDogSGVsbG8sIEknbSA8PFVTRVJOQU1FPj4K
23
+ ```
24
+ > then you can use npx to run any configuration
25
+ ```sh
26
+ npx node-automator Ci0gdHlwZTogcHJpbnQKICBkYXRhOgogICAgY29udGVudDogSGVsbG8sIEknbSA8PFVTRVJOQU1FPj4K
27
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-automator",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Execute automation with yaml configuration(compatible with json)",
5
5
  "main": "index.js",
6
6
  "repository": {