comment-variables 1.2.3 → 1.2.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.
- package/generate.template.js +1 -1
- package/library/index.js +8 -10
- package/package.json +2 -2
package/generate.template.js
CHANGED
|
@@ -32,4 +32,4 @@ const config = {
|
|
|
32
32
|
|
|
33
33
|
export default config;
|
|
34
34
|
|
|
35
|
-
// Once you've grasped these concepts, simply rename this file and its
|
|
35
|
+
// Once you've grasped these concepts, simply rename this file, its JSON counterpart and its `.mjs` counterpart to `comments.config.js`, `comments.config.json` and `comments.config.mjs` respectively and you're good to go. (If you're using the extension, make sure to run VS Code's "Developer: Reload Window" command for the extension to operate based on your new `comments.config.js` file.)
|
package/library/index.js
CHANGED
|
@@ -16,6 +16,10 @@ import resolveConfig, {
|
|
|
16
16
|
cwd,
|
|
17
17
|
knownIgnores,
|
|
18
18
|
makeResolvedConfigData,
|
|
19
|
+
makeJsonData,
|
|
20
|
+
makeMjsData,
|
|
21
|
+
makeJsonPathLog,
|
|
22
|
+
makeMjsPathLog,
|
|
19
23
|
} from "comment-variables-resolve-config";
|
|
20
24
|
|
|
21
25
|
import { hasPackageJson, hasGitFolder } from "./_commons/constants/bases.js";
|
|
@@ -187,23 +191,17 @@ if (!makeResolvedConfigDataResults.success) {
|
|
|
187
191
|
|
|
188
192
|
const resolvedConfigData = makeResolvedConfigDataResults.resolvedConfigData;
|
|
189
193
|
|
|
190
|
-
const jsonData =
|
|
194
|
+
const jsonData = makeJsonData(resolvedConfigData);
|
|
191
195
|
fs.writeFileSync(jsonPath, jsonData, "utf8");
|
|
192
196
|
|
|
193
|
-
console.log(
|
|
197
|
+
console.log(makeJsonPathLog(jsonPath));
|
|
194
198
|
|
|
195
199
|
// NEW!! comments.config.mjs to directly access resolvedConfigData.
|
|
196
200
|
|
|
197
|
-
const mjsData =
|
|
198
|
-
resolvedConfigData
|
|
199
|
-
)}} ResolvedConfigData */\n\n/** @type {ResolvedConfigData} */\nexport const resolvedConfigData = ${JSON.stringify(
|
|
200
|
-
resolvedConfigData,
|
|
201
|
-
null,
|
|
202
|
-
2
|
|
203
|
-
)}`;
|
|
201
|
+
const mjsData = makeMjsData(resolvedConfigData);
|
|
204
202
|
fs.writeFileSync(mjsPath, mjsData, "utf8");
|
|
205
203
|
|
|
206
|
-
console.log(
|
|
204
|
+
console.log(makeMjsPathLog(mjsPath));
|
|
207
205
|
|
|
208
206
|
// ADDRESSES THE CORE COMMANDS "resolve", "compress", AND "placeholders".
|
|
209
207
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comment-variables",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "A CLI tool for configuring, managing and maintaining JavaScript comments as JavaScript variables.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"comment-variables": "./library/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"type": "module",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@eslint/markdown": "^6.5.0",
|
|
33
|
-
"comment-variables-resolve-config": "^1.14.
|
|
33
|
+
"comment-variables-resolve-config": "^1.14.9",
|
|
34
34
|
"eslint": "^9.29.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|