@rse/nunjucks-cli 1.4.1 → 1.4.2

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.
package/README.md CHANGED
@@ -46,7 +46,8 @@ Options
46
46
 
47
47
  ```
48
48
  $ nunjucks
49
- [-h|--help] [-V|--version]
49
+ [-h|--help]
50
+ [-V|--version]
50
51
  [-c|--config <config-file>]
51
52
  [-C|--option <key>=<value>]
52
53
  [-d|--defines <context-file>]
package/nunjucks.1 ADDED
@@ -0,0 +1,47 @@
1
+ .TH "NUNJUCKS" "1" "August 2023" "" ""
2
+ .SH "NAME"
3
+ \fBnunjucks\fR - Template Rendering Engine
4
+ .SH "SYNOPSIS"
5
+ .P
6
+ \fBnunjucks\fR \[lB]\fB-h\fR|\fB--help\fR\[rB] \[lB]\fB-V\fR|\fB--version\fR\[rB] \[lB]\fB-c\fR|\fB--config\fR \fIconfig-file\fR\[rB] \[lB]\fB-C\fR|\fB--option\fR \fIkey\fR=\fIvalue\fR\[rB] \[lB]\fB-d\fR|\fB--defines\fR \fIcontext-file\fR\[rB] \[lB]\fB-D\fR|\fB--define\fR \fIkey\fR=\fIvalue\fR\[rB] \[lB]\fB-e\fR|\fB--extension\fR \fImodule-name\fR\[rB] \[lB]\fB-o\fR|\fB--output\fR \fIoutput-file\fR|\fB-\fR\[rB] \[lB]\fIinput-file\fR|\fB-\fR\[rB]
7
+ .SH "DESCRIPTION"
8
+ .P
9
+ \fBnunjucks\fR(1) is a small command-line utility to render templates with the rich and powerful templating language \fBMozilla Nunjucks\fR \fI\(lahttps://mozilla.github.io/nunjucks/\(ra\fR. This allows you to define your configuration in a YAML file and then render an output file based on a template input file where your configuration can be expanded. It optionally can load Nunjucks addons like the ones from the companion \fBNunjucks Addons\fR \fI\(lahttps://github.com/rse/nunjucks-addons\(ra\fR package.
10
+ .SH "OPTIONS"
11
+ .P
12
+ The following top-level options and arguments exist:
13
+ .RS 0
14
+ .IP \(bu 4
15
+ \[lB]\fB-h\fR|\fB--help\fR\[rB] Show usage help.
16
+ .IP \(bu 4
17
+ \[lB]\fB-V\fR|\fB--version\fR\[rB] show program version information.
18
+ .IP \(bu 4
19
+ \[lB]\fB-c\fR|\fB--config\fR \fIconfig-file\fR\[rB] load Nunjucks configuration YAML file.
20
+ .IP \(bu 4
21
+ \[lB]\fB-C\fR|\fB--option\fR \fIkey\fR=\fIvalue\fR\[rB] set Nunjucks configuration option.
22
+ .IP \(bu 4
23
+ \[lB]\fB-d\fR|\fB--defines\fR \fIcontext-file\fR\[rB] load context definition YAML file.
24
+ .IP \(bu 4
25
+ \[lB]\fB-D\fR|\fB--define\fR \fIkey\fR=\fIvalue\fR\[rB] set context definition key/value.
26
+ .IP \(bu 4
27
+ \[lB]\fB-e\fR|\fB--extension\fR \fImodule-name\fR\[rB] load Nunjucks JavaScript extension module (installed via NPM).
28
+ .IP \(bu 4
29
+ \[lB]\fB-o\fR|\fB--output\fR \fIoutput-file\fR|\fB-\fR\[rB] save output file (or stdout).
30
+ .IP \(bu 4
31
+ \[lB]\fB<input-file>\fR|\fB-\fR\[rB] load input file (or stdin).
32
+ .RE 0
33
+
34
+ .SH "EXAMPLE"
35
+ .P
36
+ .RS 2
37
+ .nf
38
+ $ echo "Hello, {{who}}!" | nunjucks -D who=world -
39
+ Hello, world!
40
+ .fi
41
+ .RE
42
+ .SH "HISTORY"
43
+ .P
44
+ The \fBnunjucks\fR(1) utility was developed in August 2023 for being able to easily generate multiple configuration files for a complex \fIDocker-Compose\fR based setup.
45
+ .SH "AUTHOR"
46
+ .P
47
+ Dr. Ralf S. Engelschall \fI\(larse@engelschall.com\(ra\fR
package/nunjucks.md ADDED
@@ -0,0 +1,73 @@
1
+
2
+ # nunjucks(1) -- Template Rendering Engine
3
+
4
+ ## SYNOPSIS
5
+
6
+ `nunjucks`
7
+ \[`-h`|`--help`\]
8
+ \[`-V`|`--version`\]
9
+ \[`-c`|`--config` *config-file*\]
10
+ \[`-C`|`--option` *key*=*value*\]
11
+ \[`-d`|`--defines` *context-file*\]
12
+ \[`-D`|`--define` *key*=*value*\]
13
+ \[`-e`|`--extension` *module-name*\]
14
+ \[`-o`|`--output` *output-file*|`-`\]
15
+ \[*input-file*|`-`\]
16
+
17
+ ## DESCRIPTION
18
+
19
+ `nunjucks`(1) is a small command-line utility to render templates with the rich
20
+ and powerful templating language [Mozilla Nunjucks](https://mozilla.github.io/nunjucks/).
21
+ This allows you to define your configuration in a YAML file and then render
22
+ an output file based on a template input file where your configuration can be expanded.
23
+ It optionally can load Nunjucks addons like the ones from the companion
24
+ [Nunjucks Addons](https://github.com/rse/nunjucks-addons) package.
25
+
26
+ ## OPTIONS
27
+
28
+ The following top-level options and arguments exist:
29
+
30
+ - \[`-h`|`--help`\]
31
+ Show usage help.
32
+
33
+ - \[`-V`|`--version`\]
34
+ show program version information.
35
+
36
+ - \[`-c`|`--config` *config-file*\]
37
+ load Nunjucks configuration YAML file.
38
+
39
+ - \[`-C`|`--option` *key*=*value*\]
40
+ set Nunjucks configuration option.
41
+
42
+ - \[`-d`|`--defines` *context-file*\]
43
+ load context definition YAML file.
44
+
45
+ - \[`-D`|`--define` *key*=*value*\]
46
+ set context definition key/value.
47
+
48
+ - \[`-e`|`--extension` *module-name*\]
49
+ load Nunjucks JavaScript extension module (installed via NPM).
50
+
51
+ - \[`-o`|`--output` *output-file*|`-`\]
52
+ save output file (or stdout).
53
+
54
+ - \[`<input-file>`|`-`\]
55
+ load input file (or stdin).
56
+
57
+ ## EXAMPLE
58
+
59
+ ```
60
+ $ echo "Hello, {{who}}!" | nunjucks -D who=world -
61
+ Hello, world!
62
+ ```
63
+
64
+ ## HISTORY
65
+
66
+ The `nunjucks`(1) utility was developed in August 2023 for being
67
+ able to easily generate multiple configuration files for a complex
68
+ *Docker-Compose* based setup.
69
+
70
+ ## AUTHOR
71
+
72
+ Dr. Ralf S. Engelschall <rse@engelschall.com>
73
+
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rse/nunjucks-cli",
3
3
  "publishConfig": { "access": "public" },
4
- "version": "1.4.1",
4
+ "version": "1.4.2",
5
5
  "description": "Nunjucks Template Rendering Command-Line Interface",
6
6
  "author": {
7
7
  "name": "Dr. Ralf S. Engelschall",
@@ -10,11 +10,11 @@
10
10
  },
11
11
  "license": "MIT",
12
12
  "repository": {
13
- "type": "git",
14
- "url": "git://github.com/rse/nunjucks-cli.git"
13
+ "type": "git",
14
+ "url": "git://github.com/rse/nunjucks-cli.git"
15
15
  },
16
16
  "bugs": {
17
- "url": "http://github.com/rse/nunjucks-cli/issues"
17
+ "url": "http://github.com/rse/nunjucks-cli/issues"
18
18
  },
19
19
  "bin": {
20
20
  "nunjucks": "nunjucks.js"
@@ -26,15 +26,19 @@
26
26
  "js-yaml": "4.1.0"
27
27
  },
28
28
  "devDependencies": {
29
- "eslint": "8.47.0",
29
+ "eslint": "8.48.0",
30
30
  "eslint-config-standard": "17.1.0",
31
31
  "eslint-plugin-promise": "6.1.1",
32
32
  "eslint-plugin-import": "2.28.1",
33
- "eslint-plugin-node": "11.1.0"
33
+ "eslint-plugin-node": "11.1.0",
34
+ "remark-cli": "11.0.0",
35
+ "remark": "14.0.3",
36
+ "remark-man": "8.0.1"
34
37
  },
35
38
  "upd": [ "!chalk" ],
36
39
  "scripts": {
37
40
  "lint": "eslint --config eslint.yaml nunjucks.js",
41
+ "man": "remark --quiet --use remark-man --output nunjucks.1 nunjucks.md",
38
42
  "test": "echo 'Hello, {{who}}!' | node nunjucks.js -D who=world -"
39
43
  }
40
44
  }