heading-case 0.0.0 → 0.1.0

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
@@ -1,5 +1,7 @@
1
1
  # heading-case
2
2
 
3
+ Format page titles and section headings in markdown files to use [sentence-style capitalization](https://learn.microsoft.com/en-us/style-guide/text-formatting/using-type/use-sentence-style-capitalization).
4
+
3
5
  <p>
4
6
  <a href="https://npmjs.com/package/heading-case">
5
7
  <img src="https://img.shields.io/npm/v/heading-case?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
@@ -8,6 +10,26 @@
8
10
  <a href="https://npmcharts.com/compare/heading-case?minimal=true"><img src="https://img.shields.io/npm/dm/heading-case.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
9
11
  </p>
10
12
 
13
+ ## Example
14
+
15
+ - Input:
16
+
17
+ ```md
18
+ # A New Method for Creating JavaScript Rollovers
19
+ ```
20
+
21
+ - Output:
22
+
23
+ ```md
24
+ # A new method for creating JavaScript rollovers
25
+ ```
26
+
27
+ ## Limitations
28
+
29
+ This package is designed for Rspack's documentation. It follows the writing style of Rspack documentation and may not work well for other projects.
30
+
31
+ There are some edge cases that can not be correctly handled, so the execution result is not completely reliable.
32
+
11
33
  ## Usage
12
34
 
13
35
  Install:
@@ -16,6 +38,12 @@ Install:
16
38
  npm add heading-case -D
17
39
  ```
18
40
 
41
+ Format all markdown and MDX files in the current directory:
42
+
43
+ ```bash
44
+ npx heading-case
45
+ ```
46
+
19
47
  ## License
20
48
 
21
49
  [MIT](./LICENSE).
package/bin.js ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { headingCase } from './dist/index.js';
3
+
4
+ headingCase();
package/dist/dict.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const dict: string[];
package/dist/index.d.ts CHANGED
@@ -1 +1,4 @@
1
- export {};
1
+ export declare function globMarkdownFiles(cwd: string): Promise<string[]>;
2
+ export declare function headingCase({ root, }?: {
3
+ root?: string;
4
+ }): Promise<void>;