comment-variables 0.14.1 → 0.14.3

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.
@@ -0,0 +1,7 @@
1
+ // A JavaScript file that acts as an example file for the generated Comment Variables template config. Assuming you've yet to produce your own `comments.config.js` file, use the `comment-variables compress` and `comment-variables resolve` commands to see how the following comments go back and forth from Comment Variables placeholders (`$COMMENT`) to actual comments, reversibly.
2
+
3
+ // This is a comment.
4
+ // $COMMENT#ALIAS
5
+ // Yes.
6
+ // This is a comment. Yes. This is a comment.
7
+ // $COMMENT#COMMENTS#NO
@@ -0,0 +1,31 @@
1
+ // A Comment Variables config template generated in case no config file has been found. Feel free to use it as a stepping stone to learn how to use Comment Variables.
2
+
3
+ // As a first step, go ahead and run the command `comment-variables placeholders`.
4
+ // Then rename the `$COMMENT#COMMENT` placeholder next to `alias` to `$COMMENT#ALIAS` and run `comment-variables placeholders` to see what happens.
5
+ // You can now use and explore Comment Variables on the accompanying `comments.example.js` file that has also been generated.
6
+
7
+ const data = Object.freeze({
8
+ comment: "This is a comment.",
9
+ alias: "COMMENT",
10
+ composed: "$COMMENT#COMMENT $COMMENT#COMMENTS#YES $COMMENT#ALIAS",
11
+ comments: Object.freeze({
12
+ yes: "Yes.",
13
+ no: "No.",
14
+ }),
15
+ });
16
+
17
+ const ignores = [];
18
+
19
+ const lintConfigImports = false; // can be ommitted
20
+ const myIgnoresOnly = false; // can be ommitted
21
+
22
+ const config = {
23
+ data,
24
+ ignores,
25
+ lintConfigImports,
26
+ myIgnoresOnly,
27
+ };
28
+
29
+ export default config;
30
+
31
+ // Once you've grasped these concepts, simply copy or rename this file to `comments.config.js` and you're good to go.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comment-variables",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "A CLI tool for configuring, managing and maintaining JavaScript comments as JavaScript variables.",
5
5
  "bin": {
6
6
  "jscomments": "./library/index.js",
@@ -11,8 +11,8 @@
11
11
  "library",
12
12
  "comments.config.js",
13
13
  "comments.config.json",
14
- "comments.template.js",
15
- "comments.example.js"
14
+ "generate.template.js",
15
+ "generate.example.js"
16
16
  ],
17
17
  "repository": {
18
18
  "type": "git",