Skip to content

Commit e4d1cd9

Browse files
committed
feat(description): Add config update command and split generation scripts
1 parent 22e51dc commit e4d1cd9

File tree

4 files changed

+56
-27
lines changed

4 files changed

+56
-27
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Please note that this project is released with a [Code of Conduct](RULES_OF_COND
66

77
## How Can I Contribute?
88

9-
### Reporting Bugs
9+
### Reporting Bugs
1010

1111
If you find a bug, please open an issue on our [GitHub Issues page](https://github.com/IonGireada/repo-description/issues). When reporting a bug, please include:
1212

README.md

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -179,43 +179,49 @@ Options:
179179
180180
<!-- doc-gen COMMANDS format=list -->
181181
182-
- `describe` — Generates AI-powered descriptions for repository files and outputs them in various formats. (line [85](./package.json#L85))
182+
- `describe` — Update repository descriptions in md.config.js transformDefaults for fileTreeExtended. (line [92](./package.json#L92))
183183
184184
```bash
185-
node src/cli.js . descriptions.json && node src/cli.js . descriptions.md --format markdown && node src/cli.js . descriptions-table.md --format markdown --table && node src/cli.js . descriptions-summary.md --format markdown --summary && node src/cli.js . descriptions-table-summary.md --format markdown --table --summary
185+
node src/cli.js . --update-config md.config.js --transform-name fileTreeExtended
186186
```
187187

188-
- `docs` — Generates documentation by processing Markdown files with markdown-magic. (line [90](./package.json#L90))
188+
- `describe:file` — Generates AI-powered descriptions for repository files and outputs them in various formats. (line [86](./package.json#L86))
189+
190+
```bash
191+
node src/cli.js . --output descriptions.json
192+
```
193+
194+
- `docs` — Generates documentation by processing Markdown files with markdown-magic. (line [91](./package.json#L91))
189195

190196
```bash
191197
npx [email protected] **/*.md -c md.config.js
192198
```
193199

194-
- `format` — Formats the codebase using Prettier. (line [88](./package.json#L88))
200+
- `format` — Formats the codebase using Prettier. (line [89](./package.json#L89))
195201

196202
```bash
197203
prettier --write .
198204
```
199205

200-
- `lint` — Lints the codebase for potential errors and style violations. (line [86](./package.json#L86))
206+
- `lint` — Lints the codebase for potential errors and style violations. (line [87](./package.json#L87))
201207

202208
```bash
203209
eslint src/ **/*.js **/*.json
204210
```
205211

206-
- `lint:fix` — Lints the codebase and automatically fixes fixable issues. (line [87](./package.json#L87))
212+
- `lint:fix` — Lints the codebase and automatically fixes fixable issues. (line [88](./package.json#L88))
207213

208214
```bash
209215
eslint --fix src/ **/*.js **/*.json
210216
```
211217

212-
- `prep` — Prepares the codebase by generating documentation, linting, and formatting. (line [89](./package.json#L89))
218+
- `prep` — Prepares the codebase by generating documentation, linting, and formatting. (line [90](./package.json#L90))
213219

214220
```bash
215221
npm run docs && npm run lint:fix && npm run format
216222
```
217223

218-
- `test` — Runs the test suite using Jest. (line [84](./package.json#L84))
224+
- `test` — Runs the test suite using Jest. (line [85](./package.json#L85))
219225

220226
```bash
221227
jest --passWithNoTests
@@ -276,18 +282,18 @@ repo-description/
276282
│ ├── index.js
277283
│ ├── refactor-package.js
278284
│ └── utils.js
279-
├── .env
285+
├── .env # Description unavailable.
280286
├── .gitignore
281-
├── .prettierrc.json
282-
├── babel.config.js
283-
├── CONTRIBUTING.md
284-
├── eslint.config.js
285-
├── LICENSE
286-
├── md.config.js
287-
├── package-lock.json
288-
├── package.json
289-
├── README.md
290-
└── RULES_OF_CONDUCT.md
287+
├── .prettierrc.json # Description unavailable.
288+
├── babel.config.js # Description unavailable.
289+
├── CONTRIBUTING.md # Description unavailable.
290+
├── eslint.config.js # Description unavailable.
291+
├── LICENSE # Description unavailable.
292+
├── md.config.js # Description unavailable.
293+
├── package-lock.json # Description unavailable.
294+
├── package.json # Description unavailable.
295+
├── README.md # Description unavailable.
296+
└── RULES_OF_CONDUCT.md # Description unavailable.
291297
```
292298

293299
<!-- end-doc-gen -->

md.config.js

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,36 @@
11
module.exports = {
22
transformDefaults: {
3-
fileTreeExtended: {},
3+
fileTreeExtended: {
4+
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.',
13+
'package-lock.json': 'Description unavailable.',
14+
'package.json': 'Description unavailable.',
15+
'README.md': 'Description unavailable.',
16+
'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.',
23+
},
24+
},
425
BADGES: {
526
style: 'for-the-badge',
627
},
728
},
829
transforms: {
9-
INSTALL: require('markdown-magic-install-extended'),
10-
COMMANDS: require('markdown-magic-scripts'),
11-
BADGES: require('markdown-magic-transform-badges'),
1230
fileTreeExtended: require('markdown-magic-transform-treefile-extended'),
31+
BADGES: require('markdown-magic-transform-badges'),
32+
INSTALL: require('markdown-magic-install-extended'),
1333
ACKNOWLEDGEMENTS: require('markdown-magic-transform-acknowledgements'),
34+
COMMANDS: require('markdown-magic-scripts'),
1435
},
1536
};

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
"README.md"
4343
],
4444
"scripts": {
45-
"describe": "node src/cli.js . descriptions.json && node src/cli.js . descriptions.md --format markdown && node src/cli.js . descriptions-table.md --format markdown --table && node src/cli.js . descriptions-summary.md --format markdown --summary && node src/cli.js . descriptions-table-summary.md --format markdown --table --summary",
45+
"describe": "node src/cli.js . --update-config md.config.js --transform-name fileTreeExtended",
46+
"describe:file": "node src/cli.js . --output descriptions.json",
4647
"docs": "npx [email protected] **/*.md -c md.config.js",
4748
"format": "prettier --write .",
4849
"lint": "eslint src/ **/*.js **/*.json",
@@ -82,11 +83,12 @@
8283
},
8384
"scriptsMeta": {
8485
"test": "Runs the test suite using Jest.",
85-
"describe": "Generates AI-powered descriptions for repository files and outputs them in various formats.",
86+
"describe:file": "Generates AI-powered descriptions for repository files and outputs them in various formats.",
8687
"lint": "Lints the codebase for potential errors and style violations.",
8788
"lint:fix": "Lints the codebase and automatically fixes fixable issues.",
8889
"format": "Formats the codebase using Prettier.",
8990
"prep": "Prepares the codebase by generating documentation, linting, and formatting.",
90-
"docs": "Generates documentation by processing Markdown files with markdown-magic."
91+
"docs": "Generates documentation by processing Markdown files with markdown-magic.",
92+
"describe": "Update repository descriptions in md.config.js transformDefaults for fileTreeExtended."
9193
}
9294
}

0 commit comments

Comments
 (0)