Skip to content

Commit 0daa591

Browse files
authored
Merge pull request #16 from ioncakephper:chore/better-docs
docs(config): Add detailed descriptions and normalize file paths
2 parents bc2a400 + 2c56a41 commit 0daa591

File tree

6 files changed

+53
-48
lines changed

6 files changed

+53
-48
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@ jobs:
2323
id: release
2424
with:
2525
release-type: node
26-
package-name: repo-description
2726
target-branch: main
2827
token: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
## [1.0.1](https://github.com/ioncakephper/repo-description/compare/v1.0.0...v1.0.1) (2025-11-02)
44

5-
65
### Bug Fixes
76

8-
* **ci:** correct npm token secret name capitalization ([10f0b09](https://github.com/ioncakephper/repo-description/commit/10f0b098068a4cc018c0f1e450d21bb139b60319))
9-
* **release:** configure release-please permissions and token ([d1019cb](https://github.com/ioncakephper/repo-description/commit/d1019cbaa588461fdf4d087e918b9e613d260a11))
7+
- **ci:** correct npm token secret name capitalization ([10f0b09](https://github.com/ioncakephper/repo-description/commit/10f0b098068a4cc018c0f1e450d21bb139b60319))
8+
- **release:** configure release-please permissions and token ([d1019cb](https://github.com/ioncakephper/repo-description/commit/d1019cbaa588461fdf4d087e918b9e613d260a11))
109

1110
## 1.0.0 (2025-11-02)
1211

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
245245
- [@eslint/js](https://www.npmjs.com/package/%40eslint%2Fjs) — ESLint JavaScript language implementation
246246
- [babel-jest](https://www.npmjs.com/package/babel-jest) — Jest plugin to use babel for transformation.
247247
- [commander](https://www.npmjs.com/package/commander) — the complete solution for node.js command-line programs
248-
- [conventional-changelog-cli](https://www.npmjs.com/package/conventional-changelog-cli) — No description available
249248
- [dotenv](https://www.npmjs.com/package/dotenv) — Loads environment variables from .env file
250249
- [eslint](https://www.npmjs.com/package/eslint) — An AST-based pattern checker for JavaScript.
251250
- [eslint-config-prettier](https://www.npmjs.com/package/eslint-config-prettier) — Turns off all rules that are unnecessary or might conflict with Prettier.
@@ -273,24 +272,24 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
273272
repo-description/
274273
├── __tests__
275274
│ ├── .gitkeep
276-
│ └── cli.test.js
275+
│ └── cli.test.js # Description unavailable.
277276
├── .qodo
278277
│ ├── agents
279278
│ └── workflows
280279
├── src
281-
│ ├── cli.js
282-
│ ├── describe.js
283-
│ ├── index.js
284-
│ └── utils.js
285-
├── .env # Description unavailable.
280+
│ ├── cli.js # Description unavailable.
281+
│ ├── describe.js # Description unavailable.
282+
│ ├── index.js # Description unavailable.
283+
│ └── utils.js # Description unavailable.
284+
├── .env # Configure... the environment by setting the `GROQ_API_KEY` variable to provide authentication for Groq API access.
286285
├── .gitignore
287-
├── .prettierrc.json # Description unavailable.
288-
├── babel.config.js # Description unavailable.
289-
├── CHANGELOG.md
290-
├── CONTRIBUTING.md # Description unavailable.
291-
├── eslint.config.js # Description unavailable.
292-
├── LICENSE # Description unavailable.
293-
├── md.config.js # Description unavailable.
286+
├── .prettierrc.json # Configure Prettier to enforce single quotes, trailing commas (es5), an 80‑character print width, and a specific ordering of fields in package.json via the prettier‑plugin‑packagejson.
287+
├── babel.config.js # [configure] Babel to use @babel/preset‑env with the target set to the current Node version…
288+
├── CHANGELOG.md # Documenting the project's version history by listing each release’s features, bug fixes, and related metadata in a Keep‑a‑Changelog format.
289+
├── CONTRIBUTING.md # Guide contributors on how to report bugs, suggest enhancements, and submit code via pull requests.
290+
├── eslint.config.js # Configure ESLint with global browser, node, and jest globals, recommended core and Prettier rules, and custom JSON/JSONC and YAML parsers and plugins for those file types.
291+
├── LICENSE # Granting permission to use, copy, modify, merge, publish, distribute, sublicense, and sell the software freely under the MIT License.
292+
├── md.config.js # [Exports] a configuration object that defines default settings (like file descriptions and badge style) and registers the markdown‑magic transform modules used to generate and augment the project’s documentation.
294293
├── package-lock.json # Description unavailable.
295294
├── package.json # Description unavailable.
296295
├── README.md # Description unavailable.

md.config.js

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,33 @@ module.exports = {
22
transformDefaults: {
33
fileTreeExtended: {
44
descriptions: {
5-
'.env': 'Description unavailable.',
6-
'.prettierrc.json': 'Description unavailable.',
7-
'.vscode\\launch.json': 'Description unavailable.',
8-
'babel.config.js': 'Description unavailable.',
9-
'CONTRIBUTING.md': 'Description unavailable.',
10-
'eslint.config.js': 'Description unavailable.',
11-
LICENSE: 'Description unavailable.',
12-
'md.config.js': 'Description unavailable.',
5+
'.env':
6+
'Configure... the environment by setting the `GROQ_API_KEY` variable to provide authentication for Groq API access.',
7+
'.prettierrc.json':
8+
'Configure Prettier to enforce single quotes, trailing commas (es5), an 80‑character print width, and a specific ordering of fields in package.json via the prettier‑plugin‑packagejson.',
9+
'.vscode/launch.json':
10+
'Configure launch configurations for debugging Node.js programs in VS Code.',
11+
'babel.config.js':
12+
'[configure] Babel to use @babel/preset‑env with the target set to the current Node version…',
13+
'CHANGELOG.md':
14+
"Documenting the project's version history by listing each release’s features, bug fixes, and related metadata in a Keep‑a‑Changelog format.",
15+
'CONTRIBUTING.md':
16+
'Guide contributors on how to report bugs, suggest enhancements, and submit code via pull requests.',
17+
'eslint.config.js':
18+
'Configure ESLint with global browser, node, and jest globals, recommended core and Prettier rules, and custom JSON/JSONC and YAML parsers and plugins for those file types.',
19+
LICENSE:
20+
'Granting permission to use, copy, modify, merge, publish, distribute, sublicense, and sell the software freely under the MIT License.',
21+
'md.config.js':
22+
'[Exports] a configuration object that defines default settings (like file descriptions and badge style) and registers the markdown‑magic transform modules used to generate and augment the project’s documentation.',
1323
'package-lock.json': 'Description unavailable.',
1424
'package.json': 'Description unavailable.',
1525
'README.md': 'Description unavailable.',
1626
'RULES_OF_CONDUCT.md': 'Description unavailable.',
17-
'src\\cli.js': 'Description unavailable.',
18-
'src\\describe.js': 'Description unavailable.',
19-
'src\\index.js': 'Description unavailable.',
20-
'src\\refactor-package.js': 'Description unavailable.',
21-
'src\\utils.js': 'Description unavailable.',
22-
'__tests__\\cli.test.js': 'Description unavailable.',
27+
'src/cli.js': 'Description unavailable.',
28+
'src/describe.js': 'Description unavailable.',
29+
'src/index.js': 'Description unavailable.',
30+
'src/utils.js': 'Description unavailable.',
31+
'__tests__/cli.test.js': 'Description unavailable.',
2332
},
2433
},
2534
BADGES: {

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"@babel/preset-env": "^7.28.5",
6666
"@eslint/js": "^9.38.0",
6767
"babel-jest": "^30.2.0",
68-
6968
"eslint": "^9.39.0",
7069
"eslint-config-prettier": "^10.1.8",
7170
"eslint-plugin-jsonc": "^2.21.0",

src/describe.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,20 @@ ${content}`;
108108
descriptions[path.relative(repoPath, file)] = await queryGroq(prompt);
109109
}
110110

111-
return descriptions;
111+
const transformDescriptions = (inputDescriptions) => {
112+
const outputDescriptions = {};
113+
for (const key in inputDescriptions) {
114+
if (Object.prototype.hasOwnProperty.call(inputDescriptions, key)) {
115+
const newKey = key.replace(/\\/g, '/');
116+
outputDescriptions[newKey] = inputDescriptions[key];
117+
}
118+
}
119+
return outputDescriptions;
120+
};
121+
122+
const formattedDescriptions = transformDescriptions(descriptions);
123+
124+
return formattedDescriptions;
112125
}
113126

114127
/**
@@ -158,25 +171,12 @@ async function updateMarkdownMagicConfig(
158171
* @param {boolean} [table=false] - Whether to use a table format for markdown output.
159172
*/
160173
function saveOutput(
161-
inputDescriptions,
174+
descriptions,
162175
outputFile,
163176
format = 'json',
164177
summary = false,
165178
table = false
166179
) {
167-
const transformDescriptions = (inputDescriptions) => {
168-
const outputDescriptions = {};
169-
for (const key in inputDescriptions) {
170-
if (Object.prototype.hasOwnProperty.call(inputDescriptions, key)) {
171-
const newKey = key.replace(/\\/g, '/');
172-
outputDescriptions[newKey] = inputDescriptions[key];
173-
}
174-
}
175-
return outputDescriptions;
176-
};
177-
178-
const descriptions = transformDescriptions(inputDescriptions);
179-
180180
if (format === 'json') {
181181
fs.writeFileSync(outputFile, JSON.stringify(descriptions, null, 2));
182182
} else if (format === 'markdown') {

0 commit comments

Comments
 (0)